-
Notifications
You must be signed in to change notification settings - Fork 924
fix(CodeTree): improve a11y #4938
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
Conversation
commit: |
| :items="items" | ||
| :get-key="(item) => item.path" | ||
| :default-expanded="expanded" | ||
| aria-label="File tree navigation" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this one really necessary? This would need to be translated π€
| as="ul" | ||
| role="tree" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe those are unnecessary and already done by the TreeRoot.
| <button :class="ui.link({ class: props.ui?.link, active: isSelected })"> | ||
| <button | ||
| :class="ui.link({ class: props.ui?.link, active: isSelected })" | ||
| :aria-expanded="item.children?.length ? isExpanded : undefined" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also already done
| role="treeitem" | ||
| :aria-level="level + 1" | ||
| :class="level > 0 ? ui.itemWithChildren({ class: props.ui?.itemWithChildren }) : ui.item({ class: props.ui?.item })" | ||
| :aria-selected="model?.path === item.path" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already on the button.
| <li | ||
| v-for="(item, index) in items" | ||
| :key="`${level}-${index}`" | ||
| role="treeitem" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already on the button.
|
Closing in favor of #4945. |
π Linked issue
Relates nuxt/nuxt.com#2035
β Type of change
π Description
π Checklist