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

fix(masthead): remove aria-haspopup from profile menu for VO #9562

Merged

Conversation

annawen1
Copy link
Member

Related Ticket(s)

[Masthead]: QA: Voiceover does not announce whether the profile pop up menu is expanded or collapsed #8869

Description

In mobile, VO doesn't tell user if the profile menu is expanded or collapsed - it currently identifies that it is a popup button when focus is on the button:

"user profile popup-button menu-popup double tap to activate picker"

however, this same is announced when the profile menu is expanded so it is not descriptive enough to alert user if the menu has been expanded or collapsed.

In researching, it seems that VO will not announce the aria-expanded attribute if the button element also has the aria-haspopup attribute. Removing the aria-haspopup attribute allows for VO to properly announce if the menu is expanded or not. VO then reads:

"user profile button expanded"

BEFORE:
https://user-images.githubusercontent.com/54281166/195444988-d18f97de-2bec-4aed-8873-bf0073a03d73.mov

AFTER:
https://user-images.githubusercontent.com/54281166/195445097-afefd854-800e-4d8a-bc54-e30f0e90b2a8.mov

Changelog

Removed

  • remove aria-haspopup attribute so that VO can alert user if profile menu is expanded/collapsed

@annawen1 annawen1 added package: web components Work necessary for the IBM.com Library web components package hacktoberfest-accepted labels Oct 12, 2022
@annawen1 annawen1 requested a review from a team as a code owner October 12, 2022 20:51
@annawen1
Copy link
Member Author

Hi @Gopi916 I'm wondering if it is okay to remove the aria-haspopup attribute from the profile menu button on the masthead to allow for VO to read out if menu is expanded/collapsed. Or will we be losing out on the menu information conveyed to the user?

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 12, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 12, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 12, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 12, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Oct 12, 2022

@Rasubra8
Copy link

@annawen1
Now it is working fine. I have verified this fix in Vo iPhone Safari. Now SR announces “User profile expanded /collapsed” according to the toggle function. This seems to provide a better feedback to the user because as per the functionality user can open or close the dropdown by activating the triggering control.

Copy link
Member

@kennylam kennylam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kennylam kennylam added the Ready to merge Label for the pull requests that are ready to merge label Oct 13, 2022
Copy link

@RichKummer RichKummer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kodiakhq kodiakhq bot merged commit 2b0cf42 into carbon-design-system:main Oct 13, 2022
@annawen1 annawen1 deleted the fix/masthead-profile-menu-vo branch November 28, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted package: web components Work necessary for the IBM.com Library web components package Ready to merge Label for the pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants