-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Area:AccessibilityCategory for accessibility related features and bugsCategory for accessibility related features and bugsBugError or unexpected behaviorsError or unexpected behaviors
Description
p5.js version
develop branch
What is your operating system?
None
Web browser and version
Web browser and version
Actual Behavior
I was looking at accessibility stuff and noticed a few spots where aria-labels are hardcoded in English rather than going through the t() function.
Here's what I found:
- Pagination.jsx →
aria-label="Previous Page"andaria-label="Next Page" - VersionPicker.jsx →
aria-label="Select p5.js version" - Toast.jsx →
aria-label="Close Alert" - TextArea.jsx →
aria-label="Copy" - QuickAddList/Icons.jsx → both icons have
aria-label="Descending"which looks like a copy-paste mistake tbh, one's a close icon and one's a check icon
So basically if someone switches the editor to Hindi or Spanish, their screen reader will still read these labels in English.
Expected Behavior
These should use t() like the rest of the codebase does. Looking at translations.json, there's already a nice pattern with the *ARIA suffix (like CloseButtonARIA, DirectionAscendingARIA, etc.) so the fix should be pretty straightforward.
Steps to reproduce
- Switch editor language to non-English
- Use a screen reader
- Tab through the pagination buttons on the Sketches page
- Buttons still get announced as "Previous Page" / "Next Page" in English
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area:AccessibilityCategory for accessibility related features and bugsCategory for accessibility related features and bugsBugError or unexpected behaviorsError or unexpected behaviors