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

♿ [Story a11y] Make CTAs not tabbable when not on active page #32840

Merged
merged 1 commit into from Feb 24, 2021

Conversation

mszylkowski
Copy link
Contributor

@mszylkowski mszylkowski commented Feb 23, 2021

Disable in-page CTAs from tabbing when they are not on an active page. When they are on an active page, they should have their original tabindex. We can store the original tabindex on data-orig-tabindex when a page is initialized, and update tabindex when it becomes active or inactive.

Adding tabindex="-1" to the pages directly does not prevent the children from being tabbed, so the direct a tags need to be affected

@amp-owners-bot
Copy link

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

extensions/amp-story/1.0/amp-story-page.js

@mszylkowski mszylkowski self-assigned this Feb 23, 2021
@mszylkowski mszylkowski added this to In progress in wg-stories Sprint via automation Feb 24, 2021
@mszylkowski mszylkowski merged commit e3eeb03 into ampproject:master Feb 24, 2021
wg-stories Sprint automation moved this from In progress to Done Feb 24, 2021
@mszylkowski mszylkowski deleted the ampstory_tabinactive branch February 24, 2021 17:29
@newmuis
Copy link
Contributor

newmuis commented Feb 24, 2021

Sorry I didn't catch this before merge. We should use an attribute name that is impossible for publishers to use, to avoid collisions (e.g. i-amphtml-orig-tabindex).

@mszylkowski mszylkowski restored the ampstory_tabinactive branch February 24, 2021 17:48
@mszylkowski
Copy link
Contributor Author

@newmuis Patch on #32867

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