-
Notifications
You must be signed in to change notification settings - Fork 705
[6.x] Announces the password reset error message in via the live region #19303
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
Open
gcamacho079
wants to merge
12
commits into
6.x
Choose a base branch
from
lupe/acc-222-when-pressing-the-reset-password-button-the-loading-state
base: 6.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+68
−21
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
dad6759
Add button a11y requirements, decouple error message from live region
gcamacho079 cf22434
Add new component/composable for live region, use in AuthBase and bot…
gcamacho079 688915f
Use previous composable but remove transition and conditional render
gcamacho079 4d85e67
Remove unfinished requirement
gcamacho079 e2bf4df
Rename GlobalLiveRegion back to LiveRegion
gcamacho079 5e9c5f7
Add a live region to the button component to handle loading message
gcamacho079 ecd1f7e
Make loading message visually-hidden
gcamacho079 3eb99ec
Match import spacing style
gcamacho079 a4f1865
Move loading check to its own conditional block
gcamacho079 00f0f4f
Trim both visual and SR-only message
gcamacho079 5fa40c2
Use trimmed message for live region
gcamacho079 38087ac
Remove timeout in disconnected callback
gcamacho079 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # `craft-button` accessibility | ||
|
|
||
| ## Requirements | ||
|
|
||
| - [x] Visible focus indicator via `:focus-visible` pseudo-class. This includes: | ||
| - An offset outline to maintain visibility against the button background color. | ||
| - An outline color that uses the adaptive color token (`--c-color-focus-outline`) for visibility in both light and dark modes. | ||
| - [x] A loading message is announced via a built-in live region when the loading spinner is toggled on |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,17 @@ | ||
| <script setup lang="ts"> | ||
| /** | ||
| * A top-level live region that should only have one instance per layer. | ||
| * | ||
| */ | ||
| import {useAnnouncer} from '@/common/composables/useAnnouncer'; | ||
|
gcamacho079 marked this conversation as resolved.
|
||
| import TransitionFade from '@/common/components/TransitionFade.vue'; | ||
|
|
||
| const {announcement} = useAnnouncer(); | ||
| </script> | ||
|
|
||
| <template> | ||
| <TransitionFade> | ||
| <div | ||
| id="global-live-region" | ||
| class="sr-only" | ||
| role="status" | ||
| v-if="announcement" | ||
| > | ||
| {{ announcement }} | ||
| </div> | ||
| </TransitionFade> | ||
| <div class="sr-only" role="status"> | ||
| {{ announcement }} | ||
| </div> | ||
| </template> | ||
|
|
||
| <style scoped lang="scss"></style> | ||
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.