[UIK-5053][data-table] fixed stories with checkboxes#2837
[UIK-5053][data-table] fixed stories with checkboxes#2837ilyabrower wants to merge 12 commits intorelease/v17from
Conversation
…rgalactic into UIK-5053/old-selectedRows-type-deprecation
57e4c88 to
98db3e0
Compare
| scrollPaddingTop: '44px', | ||
| }} | ||
| > | ||
| <ScreenReaderOnly role='status' aria-live='polite'> |
There was a problem hiding this comment.
this shouldn't be removed from this example, the text just need to be slightly different: "Actions are available before the table" (btw this exact pattern is used in the example we're currently testing, and the participant said the announcement was very convenient)
There was a problem hiding this comment.
I'm not sure, that we need it in advanced example, but if you insist, I'll put it back
There was a problem hiding this comment.
let's add it, this code can be copied/referenced as well, it's better to be accessible
There was a problem hiding this comment.
I removed this old example, and added SR for the reactive example (your next comment)
| const unsubscribe = selectedRows.subscribe(SelectableRows.TOGGLE_EVENT, () => { | ||
| const selectedRowsSize = selectedRows.get().length; | ||
| if (selectedRowsSize > 0) { | ||
| setAriaMessage('Action bar appeared before the table'); |
There was a problem hiding this comment.
same - we need to keep the behavior, just change the text
| const handleChangeSelectedRows = (value: string[]) => { | ||
| setSelectedRows(value); | ||
| if (!selectedRows.length) setAriaMessage('Action bar appeared before the table'); | ||
| if (value.length) setSelectedRowsDisplay(value.length); |
There was a problem hiding this comment.
aria message now is announced every time selection changes (previously there was this logic to only set the aria message if the previous value was zero)
But, I think instead of getting back the old solution, we can do it slightly differently:
- change the text to "Actions are available before the table" (like in the other examples)
- remove the logic clearing the message after timeout. Clear the message only if selected rows length = 0. It's ok that user might stumble upon the message when navigating through the page - because now the text is neutral and appropriate even for that case.
There was a problem hiding this comment.
changed to your suggestion
919f006 to
94f6b31
Compare
Motivation and Context
How has this been tested?
Screenshots (if appropriate):
Types of changes
Checklist: