@skyscanner/backpack-web 33.1.0 → 33.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,6 +78,7 @@ class BpkHorizontalNav extends Component {
78
78
  };
79
79
  render() {
80
80
  const {
81
+ ariaLabel,
81
82
  autoScrollToSelected,
82
83
  children: rawChildren,
83
84
  className,
@@ -113,6 +114,7 @@ class BpkHorizontalNav extends Component {
113
114
  /*#__PURE__*/
114
115
  // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
115
116
  _jsx(BpkMobileScrollContainer, {
117
+ ariaLabel: ariaLabel,
116
118
  innerContainerTagName: "nav",
117
119
  className: classNames,
118
120
  leadingIndicatorClassName: leadingScrollIndicatorClassName,
@@ -131,6 +133,7 @@ class BpkHorizontalNav extends Component {
131
133
  }
132
134
  }
133
135
  BpkHorizontalNav.propTypes = {
136
+ ariaLabel: PropTypes.string,
134
137
  children: PropTypes.node.isRequired,
135
138
  /**
136
139
  * Ensures that the selected item is within view when loaded on narrow-screened devices.
@@ -139,7 +142,7 @@ BpkHorizontalNav.propTypes = {
139
142
  className: PropTypes.string,
140
143
  leadingScrollIndicatorClassName: PropTypes.string,
141
144
  /**
142
- * When set to "false", the bottom border on the component isn't included. This refers
145
+ * When set to "false", the bottom border on the component isn't included. This refers
143
146
  * to the underline on the whole "BpkHorizontalNav", not the line that appears under the selected item.
144
147
  */
145
148
  showUnderline: PropTypes.bool,
@@ -147,6 +150,7 @@ BpkHorizontalNav.propTypes = {
147
150
  type: PropTypes.oneOf(Object.keys(HORIZONTAL_NAV_TYPES))
148
151
  };
149
152
  BpkHorizontalNav.defaultProps = {
153
+ ariaLabel: null,
150
154
  autoScrollToSelected: false,
151
155
  className: null,
152
156
  leadingScrollIndicatorClassName: null,
@@ -59,6 +59,7 @@ const computeScrollIndicatorClassName = (scrollerEl, leadingIndicatorClassName =
59
59
  return classNames;
60
60
  };
61
61
  const propTypes = {
62
+ ariaLabel: PropTypes.string,
62
63
  children: PropTypes.node.isRequired,
63
64
  scrollerRef: PropTypes.func,
64
65
  innerContainerTagName: PropTypes.string,
@@ -69,6 +70,7 @@ const propTypes = {
69
70
  showScrollbar: PropTypes.bool
70
71
  };
71
72
  const defaultProps = {
73
+ ariaLabel: null,
72
74
  scrollerRef: null,
73
75
  innerContainerTagName: 'div',
74
76
  className: null,
@@ -121,6 +123,7 @@ class BpkMobileScrollContainer extends Component {
121
123
  render() {
122
124
  const classNames = [getClassName('bpk-mobile-scroll-container')];
123
125
  const {
126
+ ariaLabel,
124
127
  children,
125
128
  className,
126
129
  innerContainerTagName,
@@ -156,6 +159,7 @@ class BpkMobileScrollContainer extends Component {
156
159
  onScroll: this.setScrollIndicatorClassName,
157
160
  className: scrollerClassNames,
158
161
  children: /*#__PURE__*/_jsx(InnerContainer, {
162
+ "aria-label": ariaLabel,
159
163
  ref: el => {
160
164
  this.innerEl = el;
161
165
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "33.1.0",
3
+ "version": "33.2.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",