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

Rework popup aria labels for Previous and Next #315

Open
swashbuck opened this issue Aug 7, 2024 · 1 comment
Open

Rework popup aria labels for Previous and Next #315

swashbuck opened this issue Aug 7, 2024 · 1 comment

Comments

@swashbuck
Copy link
Contributor

swashbuck commented Aug 7, 2024

Subject of the enhancement

Currently in the Hot Graphic popups, the Previous and Next buttons' aria-labels change when the button is disabled. For example, the Previous button's aria-label is simply "Previous" rather than "Previous (item 2 of 3)" when the first item is active. When _canCycleThroughPagination is true, though, the buttons are never disabled so this pattern does not apply.

Consider reworking the Hot Graphic popup aria labels for Previous and Next to more closely align with Narrative. adaptlearning/adapt-contrib-narrative#311

For the Previous button, instead of relying on the presence of a title property for determining when we're at the beginning, we would rely on the _isAtStart property. Likewise, for the Next button, we would rely on _isAtEnd.

We would also need to account for when the items can be looped through when _canCycleThroughPagination is true. Narratives do not offer this option. So, it's possible that this rework is not necessary or should be adjusted to accommodate looping.

@oliverfoster
Copy link
Member

If looping _isAtStart and _isAtEnd would always be false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants