You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Set "application" role as default true value and remove the toggle option from accessibility settings #6863
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
Please remove "Entire page has application role" from Help / Accessibility / Accessibility Options.
Fix role = "application" as default (true) attribute for the entire RStudio web UI.
Note to self: turning on the application role causes two moderate-level violations from axe 4.5.0.
Banner landmark must not be contained in another landmark
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.
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:
Keep role = "application" for the entire <div> container.
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 <divrole = "banner" ...>
...
</header> # instead of </div><main...> # Instead of <divrole = "main" ...>
...
</main> # instead of </div>
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.
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.
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.
Activity
gtritchie commentedon May 14, 2020
Note to self: turning on the application role causes two moderate-level violations from axe 4.5.0.
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.
jooyoungseo commentedon May 14, 2020
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:
role = "application"for the entire<div>container.role = "banner"androle = "main"with their corresponding HTML semantic tags like below (they are the same and HTML5 semantic tag should be used over aria if possible):axeviolations, we can selectively applyrole = "application"for menubar container, source editor, and console input area as opposed to having the entire application role.gtritchie commentedon May 14, 2020
Using a
mainelement instead of adivwith 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.
use html5 header element instead of role=banner
use html5 header element instead of role=banner (#6876)
gtritchie commentedon May 16, 2020
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.
always set role=application on entire page and remove user option
always set role=application on entire page and remove user option (#6916
R-Hannibal commentedon Jun 16, 2020
@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?
jooyoungseo commentedon Jun 16, 2020
@R-Hannibal, yes, indeed. Verified!