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

BaseControl: Support accessible, flexible layouts #60836

Open
mirka opened this issue Apr 17, 2024 · 3 comments
Open

BaseControl: Support accessible, flexible layouts #60836

mirka opened this issue Apr 17, 2024 · 3 comments
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Comments

@mirka
Copy link
Member

mirka commented Apr 17, 2024

What problem does this address?

We are running into issues where we want to tweak the layout of the help text, or reuse just the styles of the help text. Currently, it requires CSS overrides of BaseControl internals, or copy-pasting styles.

What is your proposed solution?

For example, export a BaseControl.VisualHelp like we do with BaseControl.VisualLabel. This must be accompanied by clear accessibility guidance in the docs. This is just a potential solution, there may be better solutions.

@mirka mirka added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels Apr 17, 2024
@ciampo
Copy link
Contributor

ciampo commented Jul 22, 2024

#61382 (comment) is another example of the need for BaseControl to me more flexible.

Ideally, I'd love to reach a point where:

What do you think of those goals?

How can we balance short and long term goals?

@ciampo
Copy link
Contributor

ciampo commented Jul 23, 2024

Couple more feedback items:

  • StyledHelp comes with a top margin, which makes it less easy to drop in other components. We should ideally move spacing between components to dedicated grid/flex parents, instead of using margin
  • BaseControl should be more flexible about allowing consumers to read/write IDs used to label/describe inputs (comment)

@ciampo
Copy link
Contributor

ciampo commented Jul 24, 2024

Another note: if we plan for BaseControl's individual component to be used independently (like we do in a bunch of places for StyledLabel and StyledHelp), we should reduce any differences caused by rendering such components in isolation vs when they're rendered in BaseControl.

One example is how white space is not trimmed around StyledLabel (see #63886 (comment))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants