Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/palette.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 2024-05-11 - Add ARIA labels and hide ligature text for icon-only buttons
**Learning:** Icon-only buttons using ligature fonts (like Material Symbols) need both `aria-label` on the button and `aria-hidden="true"` on the inner ligature icon, otherwise screen readers read the raw ligature text instead of the button's intended purpose.
**Action:** Always add `aria-hidden="true"` to `<span class="material-symbols-outlined">` and ensure the parent button has an `aria-label` when the button is icon-only.
15 changes: 9 additions & 6 deletions webui/components/welcome/welcome-screen.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,19 @@ <h3 class="welcome-action-title">Visit Website</h3>
class="welcome-refresh-button"
@click="$store.welcomeStore.refreshBanners(true)"
:disabled="$store.welcomeStore.bannersLoading"
title="Refresh banners">
<span class="material-symbols-outlined" :class="{ 'welcome-spin': $store.welcomeStore.bannersLoading }">refresh</span>
title="Refresh banners"
aria-label="Refresh banners">
<span class="material-symbols-outlined" aria-hidden="true" :class="{ 'welcome-spin': $store.welcomeStore.bannersLoading }">refresh</span>
</button>

<button type="button"
class="welcome-refresh-button"
@click="$store.welcomeStore.undismissBanners()"
x-show="$store.welcomeStore.hasDismissedBanners"
:disabled="$store.welcomeStore.bannersLoading"
title="Undismiss all banners">
<span class="material-symbols-outlined">undo</span>
title="Undismiss all banners"
aria-label="Undismiss all banners">
<span class="material-symbols-outlined" aria-hidden="true">undo</span>
</button>
</div>

Expand All @@ -93,8 +95,9 @@ <h3 class="welcome-action-title">Visit Website</h3>
<button class="welcome-banner-dismiss"
x-show="banner.dismissible !== false"
@click.stop="$store.welcomeStore.dismissBanner(banner.id)"
title="Dismiss">
<span class="material-symbols-outlined">close</span>
title="Dismiss"
aria-label="Dismiss">
<span class="material-symbols-outlined" aria-hidden="true">close</span>
</button>
</div>
</template>
Expand Down
16 changes: 8 additions & 8 deletions webui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,17 @@

<!-- Chat Navigation Buttons (floating over chat area) -->
<div id="chat-nav-buttons" aria-label="Chat navigation" x-cloak>
<button class="btn-icon-action" title="Scroll to top" @click="$store.chatNavigation.scrollToTop()">
<span class="material-symbols-outlined">vertical_align_top</span>
<button class="btn-icon-action" title="Scroll to top" aria-label="Scroll to top" @click="$store.chatNavigation.scrollToTop()">
<span class="material-symbols-outlined" aria-hidden="true">vertical_align_top</span>
</button>
<button class="btn-icon-action" title="Previous user message" @click="$store.chatNavigation.scrollToPrevUserMessage()">
<span class="material-symbols-outlined">keyboard_arrow_up</span>
<button class="btn-icon-action" title="Previous user message" aria-label="Previous user message" @click="$store.chatNavigation.scrollToPrevUserMessage()">
<span class="material-symbols-outlined" aria-hidden="true">keyboard_arrow_up</span>
</button>
<button class="btn-icon-action" title="Next user message" @click="$store.chatNavigation.scrollToNextUserMessage()">
<span class="material-symbols-outlined">keyboard_arrow_down</span>
<button class="btn-icon-action" title="Next user message" aria-label="Next user message" @click="$store.chatNavigation.scrollToNextUserMessage()">
<span class="material-symbols-outlined" aria-hidden="true">keyboard_arrow_down</span>
</button>
<button class="btn-icon-action" title="Scroll to bottom" @click="$store.chatNavigation.scrollToBottom()">
<span class="material-symbols-outlined">vertical_align_bottom</span>
<button class="btn-icon-action" title="Scroll to bottom" aria-label="Scroll to bottom" @click="$store.chatNavigation.scrollToBottom()">
<span class="material-symbols-outlined" aria-hidden="true">vertical_align_bottom</span>
</button>
</div>
</div>
Expand Down