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

Using ARIA roles to make grids more accessible #515

Open
MinnDevelopment opened this issue Mar 16, 2025 · 0 comments
Open

Using ARIA roles to make grids more accessible #515

MinnDevelopment opened this issue Mar 16, 2025 · 0 comments

Comments

@MinnDevelopment
Copy link

Have you considered using role="gridcell" and aria-colindex={colidx} to make the rendered cells more accessible to screen readers? There already seems to be a data-cell-colidx, which could just use the standard aria colindex instead. Similarly, the grid itself can use role="grid". However, the structure needs to change slightly to properly represent role="row".

<div class="reactgrid" role="grid">
  <div class="rg-rowgroup" role="rowgroup">
    <div class="rg-row" role="row">
      <div class="rg-cell rg-header-cell" role="columnheader">This is my header cell</div>
    </div>
  </div>
  <div class="rg-rowgroup" role="rowgroup">
    <div class="rg-row" role="row">
      <div class="rg-cell rg-text-cell" role="gridcell">This is my text cell</div>
    </div>
  </div>
</div>

See ARIA: gridcell role - ARIA | MDN

This would help with automated test tools like playwright's new ariaSnapshot, which we use extensively for our tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant