Skip to content

Set "application" role as default true value and remove the toggle option from accessibility settings #6863

Closed

Description

@jooyoungseo

System details

RStudio Edition : Server
RStudio Version : 1.3.957
OS Version      : any
R Version       : any

Steps to reproduce the problem

With NVDA or JAWS loaded, compare between on and off of the following option:

Help / Accessibility / Accessibility Options... / Entire page has application role

Describe the problem in detail

The option above was originally suggested to allow screen-reader users to selectively toggle on and off role = "application" for the RStudio web interface.

When it is on, the RStudio interface is recognized by screen readers as an application-like environment, meaning that NVDA and JAWS will turn off "virtual cursor" (AKA, browse mode) while switching to "forms mode" (AKA, focus mode). When off, users have to manually switch between two different screen-reader modes/cursor.

After several hours of testing with screen readers in different browsers, it turns out that there is no particular reason that we have to keep the toggle option because the best screen-reader navigation has been verified with the application role set to true.

Furthermore, the "Console Output" region where screen readers need to be switched back to virtual cursor (AKA, browse mode), has been properly marked up with role = "document" meaning that users can be automatically given appropriate navigation mode/cursor contextually.

Having the option could mislead users with no technical background.

Describe the behavior you expected

  1. Please remove "Entire page has application role" from Help / Accessibility / Accessibility Options.
  2. Fix role = "application" as default (true) attribute for the entire RStudio web UI.

Activity

  1. gtritchie commented on May 14, 2020

    @gtritchie
    Member

    Note to self: turning on the application role causes two moderate-level violations from axe 4.5.0.

    1. Banner landmark must not be contained in another landmark
    2. Main landmark must not be contained in another landmark

    This is because the div I put the role=application on is the parent of both the banner and main landmarks. Don't know of any real-world problem with this but be nice to avoid axe warnings if possible.

  2. jooyoungseo commented on May 14, 2020

    @jooyoungseo
    Author

    Aw, I guess I understand what's happening here, @gtritchie.

    Such landmarks as banner and main are only useful for "virtual cursor" (AKA, browse mode).

    However, RStudio Server UI is a whole application which requires "forms mode" (AKA focus mode) only except for some portions like "Console Output," etc.

    As a workaround, I suggest the following:

    1. Keep role = "application" for the entire <div> container.
    2. Replace the containers marked up with role = "banner" and role = "main" with their corresponding HTML semantic tags like below (they are the same and HTML5 semantic tag should be used over aria if possible):
    <header ...> # Instead of <div role = "banner" ...>
      ...
    </header> # instead of </div>
    <main ...> # Instead of <div role = "main" ...>
      ...
    </main> # instead of </div>
    1. In any event Step 1 and 2 do not resolve the axe violations, we can selectively apply role = "application" for menubar container, source editor, and console input area as opposed to having the entire application role.
  3. gtritchie commented on May 14, 2020

    @gtritchie
    Member

    Using a main element instead of a div with role=main is equivalent in terms of the accessibility tree produced by the browser, same with header/banner. So the same warnings will be generated by axe.

    So I think yes, we should look into applying role=application in specific regions of the page that benefit from it, instead of the whole page.

    I will use this issue to track removal of the preference option and remove role=application, then we can selectively put it back via separate issue(s) as necessary.

  4. added this to the v1.4 milestone on May 14, 2020
  5. modified the milestones: v1.4, v1.3-patch on May 16, 2020
  6. gtritchie commented on May 16, 2020

    @gtritchie
    Member

    After further discussion, will proceed to make role=application always on for top-level div, and remove the user preference. It is important this be on for best screen-reader behavior, so will fix in 1.3-patch.

  7. added 2 commits that reference this issue on May 19, 2020
    4fefc61
    ed06db6
  8. R-Hannibal commented on Jun 16, 2020

    @R-Hannibal

    @jooyoungseo - this fix should be live in the current 1.3 patch preview build (available HERE).

    If you have time will you let me know if the issue is fixed for you in that build?

  9. jooyoungseo commented on Jun 16, 2020

    @jooyoungseo
    Author

    @R-Hannibal, yes, indeed. Verified!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions