patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

DescriptionList - heading level and heading element invalid in examples

Open thatblindgeye opened this issue 1 year ago • 3 comments

Describe the problem This ranges from example code update to component update:

  • For the Popover that triggers when clicking the term help text, the heading level is not correct for where it is rendered in the DOM. Either the heading should be an h1 element, or the Popover needs to be appended in a way that the current h6 is correct.
  • For the Popover that triggers when clicking the term help text, axe complains about multiple banner landmarks. This is due to the Popover being appended to the document body and outside the main element; whenever a header is rendered outside of it, it becomes a banner landmark. Some ways to fix this could be:
    • update the element to a plain div
    • change where the Popover is appended (could also help resolve the first issue above)
    • since the Popover traps focus and has attributes similar to a Modal, all other content on the page gets set to aria-hidden="true", similar behavior to the Modal component. This might be an issue since we don't render a Backdrop for Popover like we do for Modal, though, so it may not be totally clear that content outside the Popover cannot be interacted with. Also, unlike Modal, you can click outside the Popover to close it, which may not make the aria-modal="true" attribute totally correct.

How do you reproduce the problem? Provide steps to reproduce. A codesandbox demonstrating the problem is appreciated.

Expected behavior A clear and concise description of the expected behavior.

Is this issue blocking you? List the workaround if there is one.

Screenshots If applicable, add screenshots to help explain the issue.

What is your environment?

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

What is your product and what release date are you targeting?

Any other information?

thatblindgeye avatar Jan 08 '25 20:01 thatblindgeye

https://github.com/patternfly/patternfly-react/issues/10852 has some related issues noted, but specifically for the Popover component. Potentially we could allow overriding the wrapper element for the header and footer components in Popover, so that when it's appended to doc body it can be plain divs, otherwise if it's appended within the main element the header and footer elements should be fine to use.

thatblindgeye avatar Jan 30 '25 13:01 thatblindgeye

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Apr 01 '25 11:04 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Jun 03 '25 11:06 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Aug 03 '25 11:08 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Oct 04 '25 11:10 github-actions[bot]