File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
packages/components/src/components/breadcrumb Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 11import {
2+ onMount ,
23 useDefaultProps ,
34 useMetadata ,
45 useRef ,
@@ -27,6 +28,18 @@ export default function DBBreadcrumb(props: DBBreadcrumbProps) {
2728 }
2829 } ) ;
2930
31+ // Prevent nested/duplicate navigation landmarks in Stencil by stripping host role
32+ onMount ( ( ) => {
33+ try {
34+ const parent = ( _ref as any ) ?. get ( ) ?. closest ?.( 'db-breadcrumb' ) ;
35+ if ( parent && parent . hasAttribute ( 'role' ) ) {
36+ parent . removeAttribute ( 'role' ) ;
37+ }
38+ } catch {
39+ /* no-op */
40+ }
41+ } ) ;
42+
3043 return (
3144 < nav
3245 ref = { _ref }
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import { DBBreadcrumb } from './index';
1919import { DEFAULT_VIEWPORT } from '../../shared/constants.ts' ;
2020
2121const defaultBreadcrumb : any = (
22- < DBBreadcrumb >
22+ < DBBreadcrumb ariaLabel = "Breadcrumb" >
2323 < li >
2424 < a href = "#" > Home</ a >
2525 </ li >
You can’t perform that action at this time.
0 commit comments