Skip to content

Commit a104201

Browse files
committed
fix(breadcrumb): add default ellipsis aria-label for improved accessibility
1 parent abe1755 commit a104201

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ useMetadata({});
1212

1313
useDefaultProps<DBBreadcrumbProps>({
1414
size: 'small',
15-
separator: 'chevron'
15+
separator: 'chevron',
16+
ellipsisAriaLabel: 'Expand to show all breadcrumb items'
1617
});
1718

1819
export default function DBBreadcrumb(props: DBBreadcrumbProps) {
19-
const defaultEllipsisAriaLabel = 'Expand to show all breadcrumb items';
2020
const _ref = useRef<HTMLElement | any>(null);
2121
const state = useStore<DBBreadcrumbState>({
2222
isExpanded: false,
@@ -87,7 +87,7 @@ export default function DBBreadcrumb(props: DBBreadcrumbProps) {
8787
class="db-breadcrumb-ellipsis"
8888
aria-label={
8989
props.ellipsisAriaLabel ??
90-
defaultEllipsisAriaLabel
90+
'Expand to show all breadcrumb items'
9191
}
9292
aria-expanded={
9393
state.isExpanded ? 'true' : 'false'

0 commit comments

Comments
 (0)