The HTML element has no lang attribute. This is a WCAG 2.1 A violation: https://www.w3.org/TR/WCAG21/#language-of-page
Pages should be accessible by default. Thus, there should be a reasonable default, and the ability to specify a different language. For English:
<html lang="en">
This is critical for screen readers, otherwise you can have (for example) a Spanish user's screen reader trying to pronounce English words using Spanish language rules.
There was a community question on this:
https://community.rstudio.com/t/how-to-specify-the-language-to-a-shiny-app/26472
Making shiny more accessibility friendly would be huge. There is some discussion on it also in issue #2494 regarding alt text.
What would you suggest - adding 'en' by default and exposing it as a parameter to fluidPage and other similar top-level page tags?
By the way, anyone can add this to their shiny apps by just including anywhere in the UI the line
tags$html(lang="en")
@daattali Nice, thanks for the tip! Just need to make that more prominent in our documentation and included in our examples and templates and that's probably sufficient.
By the way, anyone can add this to their shiny apps by just including anywhere in the UI the line
tags$html(lang="en")
Yes, that's possible; however, having document-level lang attribute would be ideal; local use of lang attribute should be limited to only when there is a language change to force screen readers to switch different speech synthesizers. Let me take care of this issue.