Skip to content

Commit d1f51f6

Browse files
committed
feat(NavigationBar): remove ariaLabel prop
BREAKING CHANGE: AriaLabel prop was removed from the NavigationBar component. Aria-label attribute should be set on the children passed to the NavigationBar.
1 parent 1eead84 commit d1f51f6

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

packages/orbit-components/src/NavigationBar/README.md

-5
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,4 @@ Table below contains all types of the props available in the NavigationBar compo
3535
| hideOnScroll | `boolean` | `true` | Turn on or off hiding navigation bar on scroll |
3636
| openTitle | `string` | `"Open navigation menu"` | Property for passing translation string to open Button. |
3737
| bottomStyle | `"shadow" \| "border"` | `"shadow"` | Property for setting bottom style of NavigationBar. |
38-
| ariaLabel | `string` | `"navigation"` | Optional prop for `aria-label` value (accessibility). |
3938
| transparentBgAtTop | `boolean` | `false` | Property for setting the background to be transparent when the NavigationBar is at the top of the viewport. |
40-
41-
## Accessibility
42-
43-
- The `ariaLabel` prop allows you to specify an `aria-label` attribute for the component. This attribute provides additional information to screen readers, enhancing the accessibility of the component. By using `ariaLabel`, you can ensure that users who rely on assistive technologies receive the necessary context and information about the component's purpose and functionality.

packages/orbit-components/src/NavigationBar/index.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ const NavigationBar = ({
2020
onHide,
2121
hideOnScroll = true,
2222
bottomStyle = "shadow",
23-
ariaLabel = "navigation",
2423
transparentBgAtTop = false,
2524
}: Props) => {
2625
const resolveCallback = React.useCallback(
@@ -101,7 +100,6 @@ const NavigationBar = ({
101100
!isTransparentBg && bottomStyle === "border" && "border-cloud-normal border-b",
102101
isTransparentBg ? "bg-transparent" : "bg-white-normal",
103102
)}
104-
aria-label={ariaLabel}
105103
>
106104
<div className={cx("block w-full", onMenuOpen && "me-200")}>{children}</div>
107105
{onMenuOpen && (

packages/orbit-components/src/NavigationBar/types.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ export interface Props extends Common.Globals {
1212
readonly openTitle?: string;
1313
readonly hideOnScroll?: boolean;
1414
readonly bottomStyle?: "shadow" | "border";
15-
readonly ariaLabel?: string;
1615
readonly transparentBgAtTop?: boolean;
1716
}

0 commit comments

Comments
 (0)