Skip to content

Commit 560e079

Browse files
rfiorentino1claude
authored andcommitted
fix(settings): wire search button aria-expanded + hide redundant row labels
settings.component.html - Add aria-expanded + aria-controls on the search toggle button so screen readers announce whether the search panel is open. Mirrors the fix applied to logs.component.html. - Add aria-hidden="true" to the three duplicate-text spans next to setting-backup, setting-restore, and setting-users buttons. Each button already carries the same translated text as its aria-label, so SRs were announcing the label twice (once for the visible span, once for the button). Carries forward the accessibility improvements from #2699. Deferred (substantial behavioural refactors, out of scope for pure attribute grafting): - settings.component.ts restart-required toast rewrite (custom HTML toast with manually injected Restart button + click/keydown handlers on a synthesized <button>). Explicit in the deferred list. - sidebar.component.ts interaction refactor (cached element refs, touchstart routing, click-outside-to-close). Pure behavioural change, no a11y intent. - settings.service.ts getIframeOrigin helper extraction + comment removal. Pure refactor, no a11y intent. Already on HEAD (skipped): - backup.component.html — fully done (role="group" on per-backup action groups, aria-hidden on every icon and the toggle label, translated aria-labels on every button) - sidebar.component.html — already excellent (role="menuitem", tabindex=0, handleKeydown, ariaCurrentWhenActive="page", aria-hidden on all icons, <nav> wrapper with role+aria-label) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 769ff9d commit 560e079

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ All notable changes to `homebridge-config-ui-x` will be documented in this file.
2222
- fix(plugins): tighten screen-reader coverage for plugins page and bridge modal (@rfiorentino1)
2323
- fix(status): tighten screen-reader coverage for status widgets (@rfiorentino1)
2424
- fix(logs): wire search button aria-expanded + hide decorative toolbar icons (@rfiorentino1)
25+
- fix(settings): wire search button aria-expanded + hide redundant row labels (@rfiorentino1)
2526

2627
### Other Changes
2728

ui/src/app/modules/settings/settings.component.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ <h3 class="primary-text m-0">{{ 'menu.settings.title' | translate }}</h3>
66
<button
77
type="button"
88
class="btn btn-elegant my-0 me-0"
9+
aria-controls="settings-search-region"
910
[attr.aria-label]="'form.search' | translate"
11+
[attr.aria-expanded]="showSearchBar()"
1012
(click)="toggleSearch()"
1113
>
1214
<i aria-hidden="true" [class]="`fas fa-search${showSearchBar() ? ' primary-text' : ''}`"></i>
@@ -15,7 +17,7 @@ <h3 class="primary-text m-0">{{ 'menu.settings.title' | translate }}</h3>
1517
</div>
1618

1719
@if (showSearchBar()) {
18-
<div class="row">
20+
<div id="settings-search-region" class="row">
1921
<div class="col-md-12">
2022
<form novalidate>
2123
<input
@@ -98,7 +100,7 @@ <h5 class="primary-text">
98100
[attr.inert]="isItemHidden('setting-backup') || null"
99101
>
100102
<div class="setting-row-inner d-flex justify-content-between align-items-center">
101-
<span class="pe-2">{{ 'backup.title_backup' | translate }}</span>
103+
<span class="pe-2" aria-hidden="true">{{ 'backup.title_backup' | translate }}</span>
102104
<button
103105
type="button"
104106
class="btn btn-primary waves-effect m-0 ms-3 py-1 min-w-50"
@@ -115,7 +117,7 @@ <h5 class="primary-text">
115117
[attr.inert]="isItemHidden('setting-restore') || null"
116118
>
117119
<div class="setting-row-inner d-flex justify-content-between align-items-center">
118-
<span class="pe-2">{{ 'config.restore.title' | translate }}</span>
120+
<span class="pe-2" aria-hidden="true">{{ 'config.restore.title' | translate }}</span>
119121
<button
120122
type="button"
121123
class="btn btn-primary waves-effect m-0 ms-3 py-1 min-w-50"
@@ -132,7 +134,7 @@ <h5 class="primary-text">
132134
[attr.inert]="isItemHidden('setting-users') || null"
133135
>
134136
<div class="setting-row-inner d-flex justify-content-between align-items-center">
135-
<span class="pe-2">{{ 'menu.tooltip_user_accounts' | translate }}</span>
137+
<span class="pe-2" aria-hidden="true">{{ 'menu.tooltip_user_accounts' | translate }}</span>
136138
<a
137139
class="btn btn-primary waves-effect m-0 ms-3 py-1 min-w-50"
138140
routerLink="/users"

0 commit comments

Comments
 (0)