redesign icon indicating copy to clipboard operation
redesign copied to clipboard

a11y: accessible name for Cart is broken

Open dstorey opened this issue 8 years ago • 0 comments

Steps:

  • Add something to the cart
  • read the cart with screen reader or look at the accName in dev tools

Expected:

Say something like "Cart 1 item"

Actual:

Says something like "Cart 1 1 then list two items, and reads such as "1. item one of two, 1. item 2 of two" etc.

Reason:

For some reason there is an unordered list inside with two LI, duplicating the number. This makes the number read out twice, and as there is list semantics it reads out that it is a list etc. One is set to visibility hidden but that doesn't remove from a11y tree...only display: none or hidden attribute do that. It would also need the list markup removed (or override the roles) to work correctly and add extra text via aria-label or aria-labelled by to add the extra context needed (to say" cart: 1 item" instead of "cart 1" or whatever.

Further more there is a whole lot of markup inside the cart button that is read out but can't be seen when using the keyboard. Presumably there is something there that only works with mouse or hover or something.

dstorey avatar Mar 18 '17 02:03 dstorey