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 breadcrumbs collapsed a11y failure #6985

Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 3 additions & 3 deletions packages/core/src/components/breadcrumbs/_breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
Breadcrumbs

Markup:
<ul class="#{$ns}-breadcrumbs">
<ol class="#{$ns}-breadcrumbs">
<li><a class="#{$ns}-breadcrumbs-collapsed" href="#"></a></li>
<li><a class="#{$ns}-breadcrumb #{$ns}-disabled">Folder one</a></li>
<li><a class="#{$ns}-breadcrumb" href="#">Folder two</a></li>
<li><a class="#{$ns}-breadcrumb" href="#">Folder three</a></li>
<li><span class="#{$ns}-breadcrumb #{$ns}-breadcrumb-current">File</span></li>
</ul>
</ol>

Styleguide breadcrumbs
*/
Expand All @@ -30,7 +30,7 @@ Styleguide breadcrumbs
margin: 0;
padding: 0;

// descendant selector because nothing should come between ul and li
// descendant selector because nothing should come between ol and li
> li {
align-items: center;
display: flex;
Expand Down
9 changes: 7 additions & 2 deletions packages/core/src/components/breadcrumbs/breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class Breadcrumbs extends AbstractPureComponent<BreadcrumbsProps> {
<OverflowList
collapseFrom={collapseFrom}
minVisibleItems={minVisibleItems}
tagName="ul"
tagName="ol"
ggdouglas marked this conversation as resolved.
Show resolved Hide resolved
{...overflowListProps}
className={classNames(Classes.BREADCRUMBS, overflowListProps.className, className)}
items={items}
Expand Down Expand Up @@ -127,7 +127,12 @@ export class Breadcrumbs extends AbstractPureComponent<BreadcrumbsProps> {
content={<Menu>{orderedItems.map(this.renderOverflowBreadcrumb)}</Menu>}
{...popoverProps}
>
<span className={Classes.BREADCRUMBS_COLLAPSED} />
<span
aria-label="collapsed breadcrumbs"
ggdouglas marked this conversation as resolved.
Show resolved Hide resolved
className={Classes.BREADCRUMBS_COLLAPSED}
role="button"
tabIndex={0}
/>
</Popover>
</li>
);
Expand Down