Wrap hardcoded aria-label strings with __() for i18n support#2565
Merged
calebporzio merged 1 commit intomainfrom Apr 19, 2026
Merged
Wrap hardcoded aria-label strings with __() for i18n support#2565calebporzio merged 1 commit intomainfrom
aria-label strings with __() for i18n support#2565calebporzio merged 1 commit intomainfrom
Conversation
Wrap all hardcoded English `aria-label` attribute values with Laravel's `__()` translation helper for i18n support. Several components already used `__()` correctly but these were missed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Scenario
Components with interactive elements like the modal close button and clearable input have hardcoded English
aria-labelattributes. Screen reader users in non-English locales hear English labels regardless of their application's language, making these components inaccessible to international users.The Problem
Several components use raw English strings in
aria-labelattributes instead of wrapping them with Laravel's__()translation helper. Other components in Flux already follow the correct pattern (e.g.,sidebar/toggle.blade.phpusesaria-label="{{ __('Toggle sidebar') }}"), so this is an inconsistency rather than a deliberate design decision.The Solution
Wrap all hardcoded
aria-labelstrings with__()so they can be translated via Laravel's JSON translation files:Strings added to the translatable set:
"Clear input""Close modal"A corresponding PR for Flux Pro covers the remaining hardcoded strings there.
Fixes #2294