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/1560 tabs arent correctly marked for screen reader #1637

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

anna-lach
Copy link
Collaborator

No description provided.

@anna-lach anna-lach linked an issue Nov 18, 2024 that may be closed by this pull request
Copy link

changeset-bot bot commented Nov 18, 2024

🦋 Changeset detected

Latest commit: afeb6ff

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sl-design-system/tabs Patch
@sl-design-system/menu Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 18, 2024

🕸 Website preview

You can view a preview here (commit afeb6fff529cfe33b811ee8922dba1447f95f6d6).

Copy link
Contributor

github-actions bot commented Nov 18, 2024

🕸 Storybook preview

You can view a preview here (commit afeb6fff529cfe33b811ee8922dba1447f95f6d6).

@anna-lach anna-lach marked this pull request as ready for review November 22, 2024 11:07
.changeset/rude-llamas-search.md Outdated Show resolved Hide resolved
@@ -27,6 +27,11 @@ declare global {
*/
@localized()
export class MenuButton extends ScopedElementsMixin(LitElement) {
/** @internal */
static override get observedAttributes(): string[] {
return [...super.observedAttributes, 'aria-disabled', 'aria-label'];
Copy link
Member

Choose a reason for hiding this comment

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

This is awesome, but i'm left wondering if we couldn't make a mixin that does this? I'm entirely not sure you can change static things from a mixin, but it would be wort the investigation? .... I think you can; see this RFC and the FormAssociatedMixin lit/rfcs#43

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll check :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Those observed attributes can differ per component, so I left setting them in the components, but I've created a mixin that makes the rest.

packages/components/menu/src/menu-button.ts Outdated Show resolved Hide resolved
packages/components/tabs/src/tab-group.ts Outdated Show resolved Hide resolved
packages/components/tabs/src/tab-group.ts Outdated Show resolved Hide resolved
@anna-lach anna-lach marked this pull request as draft November 25, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tabs aren't correctly marked for screen reader
3 participants