Skip to content

Commit abe1755

Browse files
committed
fix(breadcrumb): default ellipsis aria-label to satisfy a11y and snapshot alignment
1 parent 64f0d9a commit abe1755

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

e2e/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ services:
77
context: "../"
88
dockerfile: "./e2e/Dockerfile"
99
target: "playwright"
10+
args:
11+
version: "1.56.1"
1012
volumes:
1113
- "./../__snapshots__:/e2e/__snapshots__"
1214
- "./../packages/foundations/build:/e2e/packages/foundations/build"

packages/components/src/components/breadcrumb/breadcrumb.lite.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ useDefaultProps<DBBreadcrumbProps>({
1616
});
1717

1818
export default function DBBreadcrumb(props: DBBreadcrumbProps) {
19+
const defaultEllipsisAriaLabel = 'Expand to show all breadcrumb items';
1920
const _ref = useRef<HTMLElement | any>(null);
2021
const state = useStore<DBBreadcrumbState>({
2122
isExpanded: false,
@@ -84,7 +85,10 @@ export default function DBBreadcrumb(props: DBBreadcrumbProps) {
8485
<button
8586
type="button"
8687
class="db-breadcrumb-ellipsis"
87-
aria-label={props.ellipsisAriaLabel}
88+
aria-label={
89+
props.ellipsisAriaLabel ??
90+
defaultEllipsisAriaLabel
91+
}
8892
aria-expanded={
8993
state.isExpanded ? 'true' : 'false'
9094
}

0 commit comments

Comments
 (0)