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

[ampproject/amphtml] ♿ [Story a11y] Accessible close button in share menu and Twitter overlay #32863

Merged
merged 6 commits into from Feb 24, 2021

Conversation

processprocess
Copy link
Contributor

@processprocess processprocess commented Feb 24, 2021

Contributes to #32493
Applies same pattern for close button in share menu and Twitter overlay.

  • Uses button element
  • Uses localized "close" string for aria-label
  • Uses close button element reference in click event delegation

@amp-owners-bot
Copy link

amp-owners-bot bot commented Feb 24, 2021

Hey @gmajoulet, @newmuis, @Enriqe! These files were changed:

extensions/amp-story/1.0/amp-story-embedded-component.js
extensions/amp-story/1.0/amp-story-share-menu.css
extensions/amp-story/1.0/amp-story-share-menu.js
extensions/amp-story/1.0/amp-story.css

@processprocess processprocess changed the title [ampproject/amphtml] ♿ [Story a11y] Accessible share menu close button [ampproject/amphtml] ♿ [Story a11y] Accessible close button in share menu and Twitter overlay Feb 24, 2021
Copy link
Contributor

@mszylkowski mszylkowski left a comment

Choose a reason for hiding this comment

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

Thanks! This looks good

@processprocess processprocess added this to In progress in wg-stories Sprint via automation Feb 24, 2021
@processprocess processprocess merged commit f9fd4e5 into ampproject:master Feb 24, 2021
wg-stories Sprint automation moved this from In progress to Done Feb 24, 2021
@processprocess processprocess deleted the close-share branch February 24, 2021 20:16
Copy link
Contributor

@gmajoulet gmajoulet left a comment

Choose a reason for hiding this comment

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

We need to keep/add role=button to our buttons otherwise they might trigger page navigation.
I'm not sure if the bug happens in these use cases as they might be covered by other if() statements in our code (shadow DOM/embed special case), but we should keep them for consistency across the codebase.

We'll move away from this at some point in the near future but for now let's keep them.

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

Successfully merging this pull request may close these issues.

None yet

4 participants