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

[a11y] Announce table row count to ATs #12429

Merged
merged 6 commits into from
Jan 10, 2025
Merged

Conversation

esizer
Copy link
Member

@esizer esizer commented Jan 8, 2025

🤖 Resolves #12100

👋 Introduction

Adds an announcement for ATs that the total number of items in the table has changed.

🧪 Testing

  1. Build app pnpm run dev:fresh
  2. Open your favourte screen reader
  3. Navigate to a client side table e.g /skills
  4. Change some filters
  5. Observe the announcement of row count
  6. Login as admin [email protected]
  7. Navigate to a server side table /admin/users
  8. Repeat steps 4 + 5

@vd1992
Copy link
Contributor

vd1992 commented Jan 9, 2025

Open your favourte screen reader

I tried to work through things with Microsoft Narrator and it just made some things like buttons and inputs non-functional. Well, I shouldn't be too surprised

Copy link
Contributor

@vd1992 vd1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of things noticed

  • When using the search bar on a client-side table, nothing is read out for a results change. This works on the other hand for server-side tables
  • Navigating to a server-side table fires the results count twice, first zero results then the actual count. Probably the before and after of the query
  • Cannot interact with "Filter by" button when NVDA is active

@esizer
Copy link
Member Author

esizer commented Jan 9, 2025

  • When using the search bar on a client-side table, nothing is read out for a results change. This works on the other hand for server-side tables
  • Navigating to a server-side table fires the results count twice, first zero results then the actual count. Probably the before and after of the query

Thanks! I was able to fix these two (sort of) in fix announcement for client side tables.

I got it working on client side, however it does announce it once page loads which I feel as though maybe we can live with since it is not absurd to say like "Heading level one, users, X items found". Weird, but probably worth more effort than it is worth to try and fix this. 🤷‍♀️ If anyone disagrees I can look into fixing that as well.

Cannot interact with "Filter by" button when NVDA is active

Wow, I can't beleive no one has noticed this 😬 Totally a massive issue and a ticket has been created, #12454. Feel free to add any details I may have missed 👍

@vd1992
Copy link
Contributor

vd1992 commented Jan 9, 2025

I got it working on client side, however it does announce it once page loads which I feel as though maybe we can live with since it is not absurd to say like "Heading level one, users, X items found". Weird, but probably worth more effort than it is worth to try and fix this. 🤷‍♀️ If anyone disagrees I can look into fixing that as well.

It no longer announces the total when navigating to a page for me, but it does announce it when updated by filters or search bar.

Wow, I can't beleive no one has noticed this 😬 Totally a massive issue and a ticket has been created,

🙃

Comment on lines 331 to 333
defaultMessage:
"{total, plural, =0 {0 results found} =1 {1 result found} other {# result found}}",
id: "uZYkk1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't working right, it is reading out "total, plural..." for me

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, forgot the variable name was not total 😅

Fixed in fix intl variable name

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't
other {# result found}}
Be
other {# results found}}
?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, I tihnk I finally got it 😆

fix plural other string

@esizer esizer requested a review from vd1992 January 10, 2025 20:05
Copy link
Contributor

@vd1992 vd1992 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay... As far as I can tell I think things are good!

@esizer esizer added this pull request to the merge queue Jan 10, 2025
Merged via the queue into main with commit f7e20d4 Jan 10, 2025
15 checks passed
@esizer esizer deleted the 12100-announce-table-updates branch January 10, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants