A11Y: markup sidebar form errors as live regions (#25937)

This commit is contained in:
Kris 2024-02-28 15:31:57 -05:00 committed by GitHub
parent 30c86ee21d
commit b532c780c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@
ariaLabel={{i18n "sidebar.sections.custom.links.icon.label"}} ariaLabel={{i18n "sidebar.sections.custom.links.icon.label"}}
/> />
{{#if @link.invalidIconMessage}} {{#if @link.invalidIconMessage}}
<div class="icon warning"> <div class="icon warning" role="alert" aria-live="assertive">
{{@link.invalidIconMessage}} {{@link.invalidIconMessage}}
</div> </div>
{{/if}} {{/if}}
@ -50,7 +50,7 @@
{{on "input" (with-event-value (fn (mut @link.name)))}} {{on "input" (with-event-value (fn (mut @link.name)))}}
/> />
{{#if @link.invalidNameMessage}} {{#if @link.invalidNameMessage}}
<div class="name warning"> <div class="name warning" role="alert" aria-live="assertive">
{{@link.invalidNameMessage}} {{@link.invalidNameMessage}}
</div> </div>
{{/if}} {{/if}}
@ -65,7 +65,7 @@
{{on "input" (with-event-value (fn (mut @link.value)))}} {{on "input" (with-event-value (fn (mut @link.value)))}}
/> />
{{#if @link.invalidValueMessage}} {{#if @link.invalidValueMessage}}
<div class="value warning"> <div class="value warning" role="alert" aria-live="assertive">
{{@link.invalidValueMessage}} {{@link.invalidValueMessage}}
</div> </div>
{{/if}} {{/if}}