cornerstone
cornerstone copied to clipboard
feat(storefront): BCTHEME-145 Add presentation role for table on cart page
What?
@BC-tymurbiedukhin @yurytut1993 this PR adds a presentation role for table to prevent inaccurate screen reader output
Tickets / Documentation
Add links to any relevant tickets and documentation.
Screenshots (if appropriate)
Autotagging @bigcommerce/storefront-team @davidchin
@bc-alexsaiannyi , Why is role=presentation being added if the cart does in fact show tabular data?
@bc-as Could you please answer this question? ^
@mattcoy-arcticleaf, according to the story table tag for Cart content has been used due to layout reasons and adding a presentation role is aimed to ensure accurate reading in screen readers and remove any semantic meaning from the table element.
@bc-alexsaiannyi , can you confirm that the screen-reader experience is better with this addition? In my understanding, the table functions as a table, and thus should not be presentation. The real fix here might be adding scope="col" to the th elements.
@mattcoy-arcticleaf, sure, I can confirm it. Applying presentation role removes all announcements regarding table like entering/leaving table, number of columns and rows etc. It makes information cleaner for Users so they can only hear related to Cart content things which can be interacted with.
@bc-alexsaiannyi https://www.w3.org/TR/WCAG20-TECHS/F92.html