Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - [Switch] - [Doesn't support popover] #1268

Open
Misjohns opened this issue May 8, 2023 · 5 comments
Open

Bug - [Switch] - [Doesn't support popover] #1268

Misjohns opened this issue May 8, 2023 · 5 comments
Labels
Feature end user feature that requires design to define this, i.e. changes or augments the user experience.
Milestone

Comments

@Misjohns
Copy link

Misjohns commented May 8, 2023

If a popover is required for a switch element the question-circle icon doesn't wrap along with the switch label. When the label changes from a short label to a long label the question-circle icon can appear far away from the switch element.

The question-circle icon should appear roughly 8px from the last character in the label.
image

This is how it currently appears when user reduces their screen width:
image

We are using this in RHTAP for Summit

@christianvogt
Copy link

The actual dev implementation in the screenshot above is:

<Switch ... /><HelpPopover .../>

I think we can put the ? button within the switch label and it would function.

@mcoker
Copy link
Contributor

mcoker commented May 17, 2023

@christianvogt while it's valid HTML, I'm not sure if that presents any sort of a11y issue. @thatblindgeye or @jessiehuff do you know if that would be an issue? I know we have a button in a label in checkbox tree view nodes, and I can't remember if this was discussed then or not - https://www.patternfly.org/v4/components/tree-view#with-checkboxes

@thatblindgeye
Copy link

@mcoker @christianvogt in terms of putting the help popover inside the Switch label (and/or labelOff) prop is that the text label has aria-hidden="true" applied. So while you can Tab to the popover, using something like VoiceOver's navigation methods you wouldn't be able to navigate to the popover (and would have no idea there is a help popover on the page).

@mcoker mcoker removed their assignment Jun 8, 2023
@nicolethoen nicolethoen added the Feature end user feature that requires design to define this, i.e. changes or augments the user experience. label Jun 13, 2023
@andrew-ronaldson andrew-ronaldson added this to the 2023.Q3 milestone Jun 28, 2023
@andrew-ronaldson andrew-ronaldson transferred this issue from patternfly/patternfly Jul 11, 2023
@andrew-ronaldson
Copy link

andrew-ronaldson commented Jul 11, 2023

Hey @Misjohns
We talked about in a PatternFly meeting and thought this may be another option for this issue. Would either of these options work for your use case? My text here can be finessed by Content designers 😉

Image

@Misjohns
Copy link
Author

Misjohns commented Jul 11, 2023

@andrew-ronaldson Having the ? beside a label that sits above the switch or check box resolves the accessibility concern. I'm worried that it adds more text/noise to the screen. In some cases, the additional label could provide helpful context but for other cases, the label would be very redundant with the switch/check box text (as in your example). Maybe we need to document that this pattern would only be required when a popover is needed vs. every instance of a check box or switch.

@andrew-ronaldson andrew-ronaldson removed their assignment Jan 29, 2024
@andrew-ronaldson andrew-ronaldson modified the milestones: 2023.Q3, On hold Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature end user feature that requires design to define this, i.e. changes or augments the user experience.
Projects
Status: Needs triage
Development

No branches or pull requests

8 participants