Skip to content

Conversation

@wise-king-sullyman
Copy link
Collaborator

What: Closes #7350

Additional issues:

@patternfly-build
Copy link
Collaborator

patternfly-build commented Aug 11, 2022

Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! I had a couple of nits below (1 question and 1 suggested change), let me know what you think!

hasShadowBottom?: boolean;
/** Flag indicating if the PageBreadcrumb has a scrolling overflow */
hasOverflowScroll?: boolean;
/** Adds an accessible name to the breadcrumb section. Required when the has overflow scroll prop is set to true. */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I know prop descriptions should use sentence case, but I'm wondering if that should apply when referencing other props?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not positive about that myself. I think that having other props in camelCase makes things a bit more clear, but it does conflict with the sentence case prop descriptions guidance as you mentioned. I realize now that some of the other prop descriptions here are already using camelCase.

@tlabaj do you have any thoughts on this?

Copy link
Contributor

@thatblindgeye thatblindgeye Aug 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same would apply for things like "onChange" and whether that should be written as "on change..." instead within the context of prop descriptions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for a prop name it is ok to deviate from the sentence case standard.

wise-king-sullyman and others added 2 commits August 16, 2022 09:16
Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com>
Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just one comment to be applied to all warnings.

React.useEffect(() => {
if (hasOverflowScroll && !ariaLabel) {
/* eslint-disable no-console */
console.warn('An accessible aria-label is required when hasOverflowScroll is set to true.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add the component name to warnings to make it easier for consumer to identify what component needs attention.
e.g. "PageBreadcrumb: An accessible aria-label is required when hasOverflowScroll is set to true.'

@tlabaj tlabaj added the A11y label Aug 16, 2022
Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tlabaj tlabaj merged commit ac43acc into patternfly:main Aug 18, 2022
@wise-king-sullyman wise-king-sullyman deleted the page-sub-components-aria-label-updates branch August 18, 2022 17:08
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

  • eslint-plugin-patternfly-react@4.71.9
  • @patternfly/react-catalog-view-extension@4.83.9
  • @patternfly/react-charts@6.85.9
  • @patternfly/react-code-editor@4.73.9
  • @patternfly/react-console@4.83.9
  • @patternfly/react-core@4.232.9
  • @patternfly/react-docs@5.93.9
  • @patternfly/react-icons@4.83.9
  • @patternfly/react-inline-edit-extension@4.77.9
  • demo-app-ts@4.192.9
  • @patternfly/react-integration@4.194.9
  • @patternfly/react-log-viewer@4.77.9
  • @patternfly/react-styles@4.82.9
  • @patternfly/react-table@4.101.9
  • @patternfly/react-tokens@4.84.9
  • @patternfly/react-topology@4.79.9
  • @patternfly/react-virtualized-extension@4.79.9
  • transformer-cjs-imports@4.70.9

Thanks for your contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Page - add aria-label prop to components that may overflow

5 participants