Skip to content

Commit

Permalink
fix: change grid table role to treegrid (#3259)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki authored Jan 5, 2022
1 parent e9a57ba commit 4edf0af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/grid/src/vaadin-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class Grid extends ElementMixin(
loading$="[[loading]]"
column-reordering-allowed$="[[columnReorderingAllowed]]"
>
<table id="table" role="grid" aria-multiselectable="true" tabindex="0">
<table id="table" role="treegrid" aria-multiselectable="true" tabindex="0">
<caption id="sizer" part="row"></caption>
<thead id="header" role="rowgroup"></thead>
<tbody id="items" role="rowgroup"></tbody>
Expand Down
4 changes: 2 additions & 2 deletions packages/grid/test/accessibility.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ describe('accessibility', () => {
});

describe('structural roles', () => {
it('should have role grid on table', () => {
expect(grid.$.table.getAttribute('role')).to.equal('grid');
it('should have role treegrid on table', () => {
expect(grid.$.table.getAttribute('role')).to.equal('treegrid');
});

it('should have role rowgroup on row groups', () => {
Expand Down

0 comments on commit 4edf0af

Please sign in to comment.