react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Card View Accessibility: ARIA role gridcell is not allowed for given element

Open skathuria29 opened this issue 1 year ago โ€ข 3 comments

Provide a general summary of the issue here

In Card View alpha version 3.0.0-alpha.28, while testing the a11y issues in axeDevtools extension, we have observed the following issue. Repeated for each grid item. ARIA role gridcell is not allowed for given element

๐Ÿค” Expected Behavior?

This issue should not appear.

๐Ÿ˜ฏ Current Behavior

Giving accessibility issue

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

Run axeDevtools extension over CardView alpha3.0.0-alpha.28

Version

3.35.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

MacOS

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

skathuria29 avatar May 14 '24 08:05 skathuria29

This is classified by Deque as a best practice rule: https://dequeuniversity.com/rules/axe/4.8#best-practices-rules. It should be noted that our Digital Accessibility Guide - Comprehensive Testing guidance recommends running aXe with best practices โ€˜OFFโ€™: https://accessibility.corp.adobe.com/testing/web/manual_checklist/#running-axe-devtools.

This is not a false positive, because article does not technically accept the widget role of gridcell, per the Document conformance requirements for use of ARIA attributes in HTML. The use of article for a Card would make more sense when if we were implementing the WAI-ARIA feed design pattern, which behaves similarly to a grid, but expects children of the role="feed" to have role="article". Making the change to use feed rather than grid might affect behaviors like item selection and how a Windows screen reader shifts into and out of forms mode.

While the impact on accessibility caused by using the gridcell role on an article within a grid is low, it might be better to use a generic div instead of article . That way we could use either role="gridcell" or role=article depending on the context.

snowystinger avatar May 15 '24 02:05 snowystinger

Hello, @snowystinger! I am sossost, a new contributor. Can I resolve this issue??

sossost avatar May 15 '24 14:05 sossost

Go for it

snowystinger avatar May 15 '24 20:05 snowystinger