Amphtml: isInStoryPageSideEdge_ incorrectly returns true if `clicked` by pressing enter

Created on 15 Dec 2020  路  4Comments  路  Source: ampproject/amphtml

"clicking" a focused button by pressing enter or double tapping with talkback with send an event with coordinates originating from 0, 0.

isInStoryPageSideEdge_ will return true and navigate back as a result.

Test by opening page 4 of this story pressing tab until link1 is selected, then press enter.

We could read the location of the event target instead of the click.
Or we could make an exception if the click originates from 0, 0.

Discovered when testing a11y of #31552.
Screenshot of click origin when tabbing, clicking the ! button:
Screen Shot 2020-12-15 at 2 03 28 PM

This bug is related to 30183

cc @ampproject/wg-stories

Soon Accessibility Bug stories

Most helpful comment

Great catch!!

Making an exception for the (0, 0) case would be much easier than looking at the event target position, which would be a breaking change from how things work today, where an element can partially be in the protected zone but still be clickable.

All 4 comments

Note: once this is fixed it needs to be added as an a11y test in the manual QA.

Great catch!!

Making an exception for the (0, 0) case would be much easier than looking at the event target position, which would be a breaking change from how things work today, where an element can partially be in the protected zone but still be clickable.

Added the following manual QA checks:

  • Tapping a link in the left or right 48px of a story page should navigate within the story, not open the link. Please verify on desktop and mobile.
  • A11y exception: Clicking links with Talkback (by focusing them with tab and clicking enter) should always result in link navigation and never page navigation. Links should be tested with mouse clicks as well as keyboard "clicks" to account for these cases.

Note: this was actually NOT added to our manual QA testing since a11y testing is not currently included in our instructions to testers and more work is needed to start a11y testing thoroughly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sebastianbenz picture sebastianbenz  路  48Comments

retornam picture retornam  路  52Comments

choumx picture choumx  路  42Comments

lisotton picture lisotton  路  52Comments

zhouyx picture zhouyx  路  103Comments