Describe the bug
The aria-rowcount attribute for a grid was calculated incorrectly. It was adding 2 to the store's record count instead of 1. The aria-rowcount is 1-based and should include the column header row, so the correct calculation is store.count + 1.
To Reproduce
Steps to reproduce the behavior:
- Create a grid with a store containing
n records.
- Inspect the DOM of the grid container.
- Observe the
aria-rowcount attribute.
- The value was
n + 2, which is incorrect.
Expected behavior
The aria-rowcount attribute should have been n + 1. For example, a grid with 100 data rows should have an aria-rowcount of 101 (100 rows + 1 header row).
Additional context
The issue was located in src/grid/Container.mjs within the updateRowCount() method.
The fix was to change:
me.getVdomRoot()['aria-rowcount'] = finalCount + 2;
to:
me.getVdomRoot()['aria-rowcount'] = finalCount + 1;
Describe the bug The
aria-rowcountattribute for a grid was calculated incorrectly. It was adding 2 to the store's record count instead of 1. Thearia-rowcountis 1-based and should include the column header row, so the correct calculation isstore.count + 1.To Reproduce Steps to reproduce the behavior:
nrecords.aria-rowcountattribute.n + 2, which is incorrect.Expected behavior The
aria-rowcountattribute should have beenn + 1. For example, a grid with 100 data rows should have anaria-rowcountof 101 (100 rows + 1 header row).Additional context The issue was located in
src/grid/Container.mjswithin theupdateRowCount()method.The fix was to change:
me.getVdomRoot()['aria-rowcount'] = finalCount + 2;to:me.getVdomRoot()['aria-rowcount'] = finalCount + 1;