Skip to content
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

[Accessibility] Don't prepopulate aria-activedescendant with a pointer to a hidden list #1512

Closed
MarcoZehe opened this issue Sep 22, 2019 · 5 comments

Comments

@MarcoZehe
Copy link

@MarcoZehe MarcoZehe commented Sep 22, 2019

Due to some changes in Firefox, a bug was uncovered that both earlier versions of Firefox and current versions of Chrome are masking. When initially constructing the text input, after #129 was fixed, aria-activedescendant already points to the ul with ID ´compose-autosuggest-list-home`. That UL, since nothing has been typed yet, or when no suggestions are available, is inside a div that is aria-hidden="true", and thus also hidden. Firefox is, however, due to a bug I still need to file, creating an accessible for it for some reason now. That accessible is now masking the input field. The result is that I am not able to see what I am typing, and focus is inside a list that is essentially not there.

To fix, it would be best if aria-activedescendant was not set initially, and only gets set if the list is visible and a list item actually needs to be focused due to it being an autocomplete result. If the autocomplete goes away, and the list is hidden, aria-activedescendant should be cleared again. Meaning the attribute be removed.

@MarcoZehe

This comment has been minimized.

Copy link
Author

@MarcoZehe MarcoZehe commented Sep 22, 2019

Just confirmed via the HTML inspector that removing this attribute fixes the problem. So, it shold definitely not be set initially when preparing the textarea for entry. :) Thanks!

@nolanlawson

This comment has been minimized.

Copy link
Owner

@nolanlawson nolanlawson commented Sep 22, 2019

Thanks for reporting! I should be able to test on Firefox+NVDA to confirm. Perhaps VoiceOver in Safari was also masking this issue.

@nolanlawson

This comment has been minimized.

Copy link
Owner

@nolanlawson nolanlawson commented Sep 22, 2019

Just to check: it looks like initially, aria-owns points to compose-autosuggest-list-home (which is indeed inside of an aria-hidden), but aria-activedescendant is initially set as an empty string. Are you saying that aria-owns should not be set if the list is hidden, or that aria-activedescendant should be undefined rather than an empty string?

Also, which version of Firefox should I test to repro the bug? Is this only in Nightly?

@nolanlawson nolanlawson added the bug label Sep 22, 2019
@MarcoZehe

This comment has been minimized.

Copy link
Author

@MarcoZehe MarcoZehe commented Sep 22, 2019

This is in Nightly and Beta or Dev Edition. aria-activedescendant is always set for me, it is not an empty string when the empty text area gains focus and I explore its properties in HTML inspector. For safety, I think it should be undefined rather than an empty string..

@nolanlawson

This comment has been minimized.

Copy link
Owner

@nolanlawson nolanlawson commented Sep 22, 2019

Should be fixed by #1513 if I understood correctly! Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.