filament icon indicating copy to clipboard operation
filament copied to clipboard

Add aria label to action th

Open yogesh16 opened this issue 1 year ago • 5 comments

Description

This pull requests, add aria-label="actions" to action th Issue #14299

Visual changes

Before Screenshot 2024-09-20 at 7 26 38 AM After Screenshot 2024-09-20 at 7 26 29 AM

Functional changes

  • [x] Code style has been fixed by running the composer cs command.
  • [x] Changes have been tested to not break existing functionality.
  • [x] Documentation is up-to-date.

yogesh16 avatar Sep 20 '24 01:09 yogesh16

the table header for that column lacks an accessible name, which is required for elements with the columnheader role.

This is not true. I agree that it's something that should be added, but it's not required. I would argue that the label should be more descriptive though. From an accessibility standpoint a user wouldn't know what to expect if there are just 'actions'.

Perhaps you can loop over all the defined actions in the table and make it look like:

aria-label="Edit, move or delete records"

Or if it's just one action:

aria-label="Edit records"

ju5t avatar Sep 21 '24 11:09 ju5t

There could be many actions, especially if they are grouped, so I don't think listing them is what we should do here.

Also, this current PR is only suitable for English apps since the string is not translated

danharrin avatar Oct 07 '24 12:10 danharrin

@danharrin that's true. Perhaps it's possible to count all specified actions to decide if the translation should be plural?

ju5t avatar Oct 07 '24 12:10 ju5t

Sure, but it doesn't just need to adapt to the plural it also needs to be translated

danharrin avatar Oct 07 '24 12:10 danharrin

@danharrin Fixed Plural and added localization. I will update other languages as well.

yogesh16 avatar Oct 13 '24 11:10 yogesh16

Thanks

danharrin avatar Oct 23 '24 07:10 danharrin