Skip to content

Commit 1de9d71

Browse files
committed
feat(navigation) - add inert attribute to NavExpandable
1 parent 3ba79b0 commit 1de9d71

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/react-core/src/components/Nav/NavExpandable.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@ class NavExpandable extends Component<NavExpandableProps, NavExpandableState> {
141141
</button>
142142
)}
143143
</PageSidebarContext.Consumer>
144-
<section className={css(styles.navSubnav)} aria-labelledby={this.id} hidden={expandedState ? null : true}>
144+
<section
145+
className={css(styles.navSubnav)}
146+
aria-labelledby={this.id}
147+
hidden={expandedState ? null : true}
148+
{...(!expandedState && { inert: true })}
149+
>
145150
{srText && (
146151
<h2 className="pf-v6-screen-reader" id={this.id}>
147152
{srText}

0 commit comments

Comments
 (0)