New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Day of week should be announced to screen readers when navigating the calendar #25
Comments
@JamesCatt Thank you for reporting this! I think we’d like to keep the grid role, but we’re also aware that the support for it isn’t all the way there yet for it. That being said, this still needs to be solved somehow and I think your suggestion is pretty good idea. |
Note that Arrow key navigation can be retained for keyboard-only users no matter the role. |
@aardrian Fair point. I guess I was thinking that without That being said, if it was removed then the arrow key interaction could catch a screen reader user by surprise, no? I'm guessing without the role then the screen reader would stay in browse mode by default and the arrow keys wouldn't trigger the JS, but if they flipped into focus mode then it could get a little hairy. Admittedly it might be a bit of an edge case though. |
Skilled screen reader users are already familiar with table navigation commands. Without column headers and positioning information arrow keys will confuse unskilled screen reader users (they will not know their place in the table).
Take a standard Since arrow keys are used by screen reader users to navigate content already (including word or letter at a time), in order to remove that ability and pass the arrow press through to the page you will need to do more than add a grid role.
The screen reader stays in virtual/browse mode with or without the role. The user can change to forms/focus mode by tabbing or putting focus on a form element (and exit it with So, to recap:
All of the above is true if the user encounters References: |
The items I list above are also why I asked #26 to not be closed. Column headers are a better way of exposing this information to screen reader users -- barring testing with users telling you otherwise. |
Thanks for all the useful info and links @aardrian. I'll be sure to read through them all. I am definitely in the unskilled screen reader user category you noted. It's hard for me at times to discern what is expected behaviour and what is surprising behaviour for screen readers, as I don't have the experience of using them day in, day out. There are likely subtleties and conventions that pass me by. I agree, #25 seems like a preferable solution. But let's not have two open issues discussing the same problem, albeit with different proposed solutions. I will edit the title of this issue to describe the problem, rather than the solution. Aside: is there any value in using |
No.
For example, if I use the built-in inspector in JAWS (
The browser hands over no human-readable data other than the text node. That being said, if it does not add bloat to the page (compared to a JS library, it will not) it may be worth adding it if there is some machine slurping that data that is unknown to me. |
Can this issue be changed from "enhancement" to "bug"? The referenced closed issue was definitely a bug. |
Sure, I just updated the labels. Ah ok. My thinking was a screen reader is a machine reading the page, so I was curious if it would trigger the dates to be read out in a more convenient format or anything like that. But if not, seems like a needless change! |
A screen reader announces the content that the user agent provides. A browser (user agent) is a machine, but one that act on behalf of the person to parse code into human-readable content. By machine-readable, I mean something that slurps things RDF data, such as a search engine, to use for structuring, sorting, filtering data that may or may not eventually be re-purposed and presented to users in raw or aggregate form. |
Fixed in #51, released in |
Is your feature request related to a problem? Please describe.
Currently the days of the week aren't announced by a screen reader when navigating the calendar. The
<table>
structure is correct, so presumably this is due to the use ofgrid
+gridcell
roles. Whatever the cause, the result is that screen reader users don't know what day of the week their currently-focused date is.Describe the solution you'd like
Simplest solution would be to append or prepend the day of the week to the hidden text in each
button
, i.e.:This could be done with
Date.toLocaleDateString()
to support internationalization.Describe alternatives you've considered
The only alternative I can think of would be to drop the use of
grid
and just use a plaintable
, but this doesn't seem like a good solution—it would mean sighted keyboard users would be forced to TAB through the calendar instead of using arrow keys.Additional context
Tested with JAWS, NVDA and MacOS Voiceover.
The text was updated successfully, but these errors were encountered: