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

fix(block): add accessible label for slotted controls #9502

Merged
merged 2 commits into from
Jun 6, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export class Block
headerContent
)}
{hasControl ? (
<div class={CSS.controlContainer}>
<div aria-labelledby={IDS.header} class={CSS.controlContainer}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the control actually labeled by the entire header? When I run this through VO it works but UX wise I'm not 100% sure it makes sense. The entire header includes icons, heading, and description. That's potentially a lot of content to label a control.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its just the title and icon.

const headerContent = (
<header class={CSS.header} id={IDS.header}>
{this.renderIcon()}
{this.renderTitle()}
</header>
);

<slot name={SLOTS.control} />
</div>
) : null}
Expand Down
Loading