fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Inappropriate names announced for the pagination buttons

Open jgage176 opened this issue 7 years ago • 7 comments

Actual:​

  1. In K4D tool for the buttons such as "1", "2", "3", etc. is provide with name as "1 button", '2 button", "3 button", etc. respectively which is incorrect.​
  2. In k4D tool selected pagination button such as "1" is provided with name as "undefined selected page button" which is incorrect.

​Expected:​ For screen reader users the pagination button such as "1", "2", "3", etc. buttons should be announced as "Page 1 button", "Page 2 button", etc. and the selected button should be announced as "Page 1 selected button".​ ​ User Impact:​ If the proper name of an interactive element is not announced to the screen reader users then they might not know how to interact with them.

Recommendations: Please refer to below URL which is repository for accessibility bug fixes. https://microsoft.sharepoint.com/teams/msenable/Pages/Home.aspx

jgage176 avatar Sep 18 '19 21:09 jgage176

@jgage176 Which buttons on that sharepoint page are you referring to?

Looking at the Pagination code, this might be fixed by setting a different ariaLabel on the IIconProps that are used for firstPageIconProps, previousPageIconProps, etc... @caradong is that the right approach?

aneeshack4 avatar Sep 19 '19 00:09 aneeshack4

This bug is referring to the specific number buttons for the pagination:

image

Not sure if that would work to override it, however this really should be fixed globally so that each user doesn't have to override it, right?

jgage176 avatar Sep 19 '19 20:09 jgage176

Ah I see - have you tried the approach I mentioned in the previous comment? as for whether this is the right approach to be applied globally, I'll wait for @caradong, the component author to have a chance to respond on that. She's currently out of office I believe so there might be a little delay.

aneeshack4 avatar Sep 20 '19 23:09 aneeshack4

Taking a look after vacation and will circle back shortly.

caradong avatar Sep 25 '19 21:09 caradong

@jgage176 @aneeshack4 not sure if you have seen the example pagination component on the example page of experiment package. It does define the aria labels for the buttons more or less like what you have described in the expected behavior. Here is a screen shot of the dom image

The code for this example is located at packages\experiments\src\components\Pagination\examples\Pagination.Buttons.Customization.Round.Example.tsx

Maybe the undefined in your case is due to the fact that some aria -label string properties are not defined?

To see this example page, cd into Source\Repos\caradongOfficeUIFabric\packages\experiments>, then yarn start

caradong avatar Sep 26 '19 21:09 caradong

Thank you for the follow-up. I feel like if it should always be set it should at least start with the right values and be able to override them for localization/customization, instead of just a the bare number, but at the same time I get that Office Fabric is mainly built around the model of passing in data for labels to support localization/customization. We can try what you have suggested.

jgage176 avatar Sep 26 '19 22:09 jgage176

It sounds like there's a solution on your end @jgage176 so I'll go ahead and close this but if something else comes up, please feel free to ping here again.

aneeshack4 avatar Sep 26 '19 22:09 aneeshack4