Skip to content

Commit

Permalink
Missing accessible labels
Browse files Browse the repository at this point in the history
  • Loading branch information
WesSouza committed Dec 17, 2024
1 parent 4634db9 commit 8a0050e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
16 changes: 14 additions & 2 deletions src/Wes95/components/Explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ export const Explorer = () => {
<footer class="Taskbar" onClick={handleDesktopTaskbarClick}>
<MenuButton
appearance="taskbar-start"
aria-label="Start"
direction="block-start"
items={[
{
Expand Down Expand Up @@ -398,6 +399,7 @@ export const Explorer = () => {
>
{(window) => (
<button
aria-label={window.title}
classList={{
TaskbarButton: true,
'-active':
Expand All @@ -421,11 +423,21 @@ export const Explorer = () => {
</div>
<div class="TaskbarStatus StatusField">
<Show when={screenBreakpoint() !== 'small'}>
<button class="GhostButton" onClick={handleDing} type="button">
<button
aria-label="Speaker"
class="GhostButton"
onClick={handleDing}
type="button"
>
<Icon icon="toolbarSound" />
</button>
</Show>
<button class="GhostButton" onClick={handleShare} type="button">
<button
aria-label="Eject"
class="GhostButton"
onClick={handleShare}
type="button"
>
<Icon icon="toolbarEject" />
</button>
<Show when={screenBreakpoint() !== 'small'}>
Expand Down
2 changes: 2 additions & 0 deletions src/Wes95/components/MenuButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Menu, type MenuItem, type MenuSeparator } from './Menu';
import { WindowManager } from '../lib/WindowManager';

export const MenuButton = (p: {
'aria-label'?: string;
appearance?: 'menu' | 'taskbar' | 'taskbar-start';
children?: JSX.Element;
direction?: 'block-start' | 'block-end' | 'inline-start' | 'inline-end';
Expand Down Expand Up @@ -108,6 +109,7 @@ export const MenuButton = (p: {
aria-controls={menuOpen() ? menuId : undefined}
aria-expanded={menuOpen() ? 'true' : undefined}
aria-haspopup={'menu'}
aria-label={p['aria-label']}
classList={{
MenuButton: p.appearance !== 'taskbar',
TaskbarButton:
Expand Down
7 changes: 5 additions & 2 deletions src/Wes95/programs/Bluesky/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export function BlueskyPost(p: {
}
href={`app://Bluesky/Profile?did=${encodeURIComponent(post().author.handle)}`}
>
<img src={post().author.avatar} />
<img src={post().author.avatar} alt="User avatar" />
</Link>
</Show>
<Show when={p.replyLine}>
Expand Down Expand Up @@ -168,21 +168,23 @@ export function BlueskyPost(p: {
class={styles.PostContentImage}
href={`app://QuickView/Main?open=${encodeURIComponent(image.fullsize)}`}
>
<img src={image.thumb} />
<img src={image.thumb} alt={image.alt} />
</Link>
)}
</For>
</div>
</Show>
<Show when={embedVideo()}>
<Link
aria-label="Video"
class={styles.PostContentVideo}
href={`app://MediaPlayer/Main?open=${encodeURIComponent(embedVideo()!.playlist)}`}
>
<Show when={embedVideo()!.thumbnail}>
<img
class={styles.PostContentVideoCover}
src={embedVideo()!.thumbnail}
alt={embedVideo()!.alt}
/>
<Icon icon="fileTypeVideo" size="small" />
</Show>
Expand All @@ -197,6 +199,7 @@ export function BlueskyPost(p: {
<Show when={embedExternal()!.thumb}>
<img
class={styles.PostContentExternalCover}
alt="Thumbnail"
src={embedExternal()!.thumb!}
/>
</Show>
Expand Down
2 changes: 1 addition & 1 deletion src/Wes95/programs/Bluesky/ProfileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function BlueskyProfileHeader(p: {
[styles.ProfileAvatar!]: true,
}}
>
<img src={p.profile.avatar} />
<img src={p.profile.avatar} alt="User avatar" />
</div>
<Link
alwaysExternal
Expand Down
8 changes: 8 additions & 0 deletions src/Wes95/programs/MediaPlayer/MainWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export function MediaPlayerMainWindow(p: {
<div class={styles.Controls}>
<div class={styles.Timeline}>
<input
aria-label="Timeline"
type="range"
min="0"
max={mediaPlayer.state.duration}
Expand All @@ -231,6 +232,7 @@ export function MediaPlayerMainWindow(p: {
</div>
<div class={styles.Buttons}>
<button
aria-label="Play"
classList={{
ThinButton: true,
[styles.Button!]: true,
Expand All @@ -242,6 +244,7 @@ export function MediaPlayerMainWindow(p: {
<Symbol symbol="mediaPlay" />
</button>
<button
aria-label="Pause"
classList={{
ThinButton: true,
[styles.Button!]: true,
Expand All @@ -253,6 +256,7 @@ export function MediaPlayerMainWindow(p: {
<Symbol symbol="mediaPause" />
</button>
<button
aria-label="Stop"
class={'ThinButton ' + styles.Button}
onClick={() => mediaPlayer.stop()}
type="button"
Expand All @@ -261,27 +265,31 @@ export function MediaPlayerMainWindow(p: {
</button>
<div class="VerticalSeparator"></div>
<button
aria-label="Skip Backwards"
class={'ThinButton ' + styles.Button}
onClick={() => mediaPlayer.skipBack()}
type="button"
>
<Symbol symbol="mediaSkipBack" />
</button>
<button
aria-label="Rewind"
class={'ThinButton ' + styles.Button}
onClick={() => mediaPlayer.rewind()}
type="button"
>
<Symbol symbol="mediaRewind" />
</button>
<button
aria-label="Fast Forward"
class={'ThinButton ' + styles.Button}
onClick={() => mediaPlayer.fastForward()}
type="button"
>
<Symbol symbol="mediaFastForward" />
</button>
<button
aria-label="Skip Forward"
class={'ThinButton ' + styles.Button}
onClick={() => mediaPlayer.skipForward()}
type="button"
Expand Down

0 comments on commit 8a0050e

Please sign in to comment.