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

[select] style bug if no label #1250

Closed
yinonov opened this issue Mar 3, 2022 · 8 comments · Fixed by #1251
Closed

[select] style bug if no label #1250

yinonov opened this issue Mar 3, 2022 · 8 comments · Fixed by #1251
Assignees
Labels

Comments

@yinonov
Copy link
Contributor

yinonov commented Mar 3, 2022

Describe the bug
select with no label positions the selected option as if it considers a label present.

To Reproduce
Steps to reproduce the behavior:

  1. Go to story
  2. remove the label (from controls)
  3. Select an option
  4. See the bug

Expected behavior
style should be conditioned in css and align the selected option to vertical middle if no label.
note that dense select should not be affected

Screenshots
image

Additional context
Dense no label features a WCAG violation as form associated element must have a label.

These use cases should instruct consumers of this violation unless compensated by aria-label / aria-labeledby. should be added to guideline?

@jshenkman
Copy link
Contributor

Notice, Select component - dense variant should have a placeholder text as well. It's not instead of having a label but it should be in addition.

here are some examples

  1. Carbon
    Screen Shot 2022-03-03 at 12 00 31
    Screen Shot 2022-03-03 at 12 01 04

  2. Spectrum
    Screen Shot 2022-03-03 at 12 01 52
    Screen Shot 2022-03-03 at 12 02 12

@rachelbt
Copy link
Contributor

rachelbt commented Mar 3, 2022

there's no place holder in the select component, it present the first option in the inside list.
@yinonov currently one can add a select with or without a label even it is is a violation.

@rachelbt rachelbt linked a pull request Mar 3, 2022 that will close this issue
@rachelbt
Copy link
Contributor

rachelbt commented Mar 6, 2022

@yinonov maybe we need to add an option for "hideLabel" that hides visually the label but keeps the aria-label.

@yinonov
Copy link
Contributor Author

yinonov commented Mar 6, 2022

select supports aria-label/labeledby. what's the benefit of it?

@RoyMenczerVonage
Copy link

Hi,
Can you please update me when this fix is released?
Thanks

@yinonov
Copy link
Contributor Author

yinonov commented Mar 13, 2022

Hi, Can you please update me when this fix is released? Thanks

@RoyMenczerVonage it's out https://github.com/Vonage/vivid/blob/master/CHANGELOG.md#2260-2022-03-13

@RoyMenczerVonage
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants