@patternfly/react-core 4.216.0 → 4.217.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.216.0",
3
+ "version": "4.217.1",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -34,9 +34,9 @@
34
34
  "generate": "node scripts/copyStyles.js"
35
35
  },
36
36
  "dependencies": {
37
- "@patternfly/react-icons": "^4.67.0",
38
- "@patternfly/react-styles": "^4.66.0",
39
- "@patternfly/react-tokens": "^4.68.0",
37
+ "@patternfly/react-icons": "^4.68.1",
38
+ "@patternfly/react-styles": "^4.67.1",
39
+ "@patternfly/react-tokens": "^4.69.1",
40
40
  "focus-trap": "6.2.2",
41
41
  "react-dropzone": "9.0.0",
42
42
  "tippy.js": "5.1.2",
@@ -60,5 +60,5 @@
60
60
  "react": "^16.8.0 || ^17.0.0",
61
61
  "react-dom": "^16.8.0 || ^17.0.0"
62
62
  },
63
- "gitHead": "78b436c5a6bdae02a7a6b4bb8c6b94e2ab1586be"
63
+ "gitHead": "e49da36e9926344b36f8aad556214491af4ec202"
64
64
  }
@@ -29,6 +29,10 @@ export interface HelperTextItemProps extends React.HTMLProps<HTMLDivElement | HT
29
29
  * assistive technologies.
30
30
  */
31
31
  id?: string;
32
+ /** Text that is only accessible to screen readers in order to announce the status of a helper text item.
33
+ * This prop can only be used when the isDynamic prop is also passed in.
34
+ */
35
+ screenReaderText?: string;
32
36
  }
33
37
 
34
38
  const variantStyle = {
@@ -48,6 +52,7 @@ export const HelperTextItem: React.FunctionComponent<HelperTextItemProps> = ({
48
52
  isDynamic = false,
49
53
  hasIcon = isDynamic,
50
54
  id,
55
+ screenReaderText = `${variant} status`,
51
56
  ...props
52
57
  }: HelperTextItemProps) => {
53
58
  const Component = component as any;
@@ -70,7 +75,11 @@ export const HelperTextItem: React.FunctionComponent<HelperTextItemProps> = ({
70
75
  {variant === 'error' && <ExclamationCircleIcon />}
71
76
  </span>
72
77
  )}
73
- <span className={css(styles.helperTextItemText)}>{children}</span>
78
+
79
+ <span className={css(styles.helperTextItemText)}>
80
+ {children}
81
+ {isDynamic && <span className="pf-u-screen-reader">: {screenReaderText};</span>}
82
+ </span>
74
83
  </Component>
75
84
  );
76
85
  };
@@ -44,6 +44,11 @@ exports[`HelperText dynamic helper text renders successfully 1`] = `
44
44
  class="pf-c-helper-text__item-text"
45
45
  >
46
46
  help test text
47
+ <span
48
+ class="pf-u-screen-reader"
49
+ >
50
+ : default status;
51
+ </span>
47
52
  </span>
48
53
  </div>
49
54
  </div>
@@ -679,13 +679,13 @@ export class Select extends React.Component<SelectProps & OUIAProps, SelectState
679
679
  };
680
680
 
681
681
  handleTypeaheadKeys = (position: string, shiftKey: boolean = false) => {
682
- const { isOpen, onFavorite } = this.props;
682
+ const { isOpen, onFavorite, isCreatable } = this.props;
683
683
  const { typeaheadCurrIndex, tabbedIntoFavoritesMenu } = this.state;
684
684
  const typeaheadActiveChild = this.getTypeaheadActiveChild(typeaheadCurrIndex);
685
685
  if (isOpen) {
686
686
  if (position === 'enter') {
687
687
  if (
688
- typeaheadCurrIndex !== -1 && // do not allow selection without moving to an initial option
688
+ (typeaheadCurrIndex !== -1 || (isCreatable && this.refCollection.length === 1)) && // do not allow selection without moving to an initial option unless it is a single create option
689
689
  (typeaheadActiveChild || (this.refCollection[0] && this.refCollection[0][0]))
690
690
  ) {
691
691
  if (typeaheadActiveChild) {