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

Expandable button always announced as collapsed by Narrator #33528

Closed
HeiglCorp opened this issue Mar 31, 2021 · 3 comments
Closed

Expandable button always announced as collapsed by Narrator #33528

HeiglCorp opened this issue Mar 31, 2021 · 3 comments

Comments

@HeiglCorp
Copy link

Hi,

I am using Narrator on Windows 10. I noticed the collapsible button component on https://getbootstrap.com/docs/4.0/components/dropdowns/#single-button-dropdowns is

  • always announcing button as being collapsed despite being expanded
  • announces "Dropdown Button Collapsed has popup" twice when clicking on it for the first time after page load

I was wondering if there is a way for me to fix this when using this component or if it is a general issue in the library.

Thanks,
Dominik

@patrickhlauke
Copy link
Member

Tested the above (old) version of bootstrap just now in Chrome , Firefox, and Edge with Narrator.

Worth stating right up front that Narrator has a shortcoming in that it does not announce dynamic changes of aria-expanded right away in Chrome/Firefox.

When first tabbing to that single button dropdown, it's announced as "dropdown button, menu item, collapsed" in Chrome/Firefox, "dropdown button, button, collapsed, has popup" using Edge.

Activating the dropdown results in no announcement at all in Chrome/Firefox. However, tabbing forward (into the now open dropdown) and then back correctly announces "dropdown button, menu item, expanded".

In Edge, Narrator will, after opening the dropdown, re-announce "dropdown button, button, collapsed, has popup". Moving focus forward and back re-announces is still as "collapsed".

Testing some other clean examples from ARIA practices, it seems a bug that happens when using aria-expanded in combination with aria-haspopup.

This looks like a bug in Narrator for the Chrome/Firefox behaviour, and a bug in either Narrator or Edge (or both) for the incorrect announcement there.

One thing we could consider doing is dropping the aria-haspopup attribute, and just leaving this as exposed as an expand/collapse disclosure control. similar conceptually to this recent example https://www.w3.org/TR/wai-aria-practices-1.2/examples/disclosure/disclosure-navigation.html

As for the double announcement when clicking on the control after page load, I was unable to reproduce this in all browsers.

@patrickhlauke
Copy link
Member

hah, and i see that for v5 we already nuked the aria-haspopup attribute...
https://getbootstrap.com/docs/5.0/components/dropdowns/#single-button

@XhmikosR
Copy link
Member

Fix in #33624

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

No branches or pull requests

4 participants