Skip to content
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

The accessible name for the "Prompts Panel" button is unclear and not unique. #5314

Open
derekjackson-das opened this issue Jan 14, 2025 · 0 comments
Labels
a11y Accessibility

Comments

@derekjackson-das
Copy link
Collaborator

derekjackson-das commented Jan 14, 2025

Issue Description

The button to open the panel for editing saved prompts is currently labeled as "prompts-menu-trigger". This label is not descriptive of the button's purpose and does not uniquely identify individual prompt buttons among other saved prompts. This can create challenges for screen reader users in identifying and navigating the buttons.

WCAG Criteria

2.4.6 Headings and Labels (Level AA)

Screenshot or Screen Recording

Chrome with the dev tools open showing the name of the button "prompts-menu-trigger" in the inspector with arrows indicating the button in the UI of the application in the prompts library for each saved prompt.

Snippet

html

<button 
    id="prompts-menu-trigger" 
    aria-label="prompts-menu-trigger" 
    class="z-50 inline-flex h-7 w-7 items-center justify-center rounded-md border border-border-medium bg-transparent p-0 text-sm font-medium transition-all duration-300 ease-in-out hover:border-border-heavy hover:bg-surface-secondary focus:border-border-heavy focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" 
    type="button" 
    aria-haspopup="menu" 
    aria-expanded="false" 
    data-state="closed">
    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu icon-md text-text-secondary">
        <line x1="4" x2="20" y1="12" y2="12"></line>
        <line x1="4" x2="20" y1="6" y2="6"></line>
        <line x1="4" x2="20" y1="18" y2="18"></line>
    </svg>
</button>

Notes

The names for these buttons need to be more descriptive and unique, for example:

Descriptive: "Prompt Actions"
Unique: "{{prompt name}} Prompt Actions"
This will ensure clarity and distinguishability for screen reader users.

This is an issue identified by Accessibility issues for screenreader users #5187

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility
Projects
None yet
Development

No branches or pull requests

1 participant