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

va-textarea: Move Headline location to be W3C compliant #1470

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Andrew565
Copy link
Contributor

@Andrew565 Andrew565 commented Jan 29, 2025

Chromatic

https://3681-move-textarea-header--65a6e2ed2314f7b8f98609d8.chromatic.com


Description

Closes #3681

Moves the HeaderLevel element around so that it wraps the label element, since labels aren't supposed to have h1-h6 elements as their children.

QA Checklist

  • Component maintains 1:1 parity with design mocks
  • Text is consistent with what's been provided in the mocks
  • Component behaves as expected across breakpoints
  • Accessibility expert has signed off on code changes (if applicable. If not applicable provide reason why)
  • Designer has signed off on changes (if applicable. If not applicable provide reason why)
  • Tab order and focus state work as expected
  • Changes have been tested against screen readers (if applicable. If not applicable provide reason why)
  • New components are covered by e2e tests; updates to existing components are covered by existing test suite
  • Changes have been tested in vets-website using Verdaccio (if applicable. If not applicable provide reason why)

Screenshots

No visual changes.

Acceptance criteria

  • QA checklist has been completed
  • Screenshots have been attached that cover desktop and mobile screens

Definition of done

  • Documentation has been updated, if applicable
  • A link has been provided to the originating GitHub issue (or connected to it via ZenHub)

@Andrew565 Andrew565 added the patch Patch change in semantic versioning label Jan 29, 2025
@Andrew565 Andrew565 self-assigned this Jan 29, 2025
@Andrew565 Andrew565 requested a review from a team as a code owner January 29, 2025 15:19
@Andrew565 Andrew565 requested a review from rsmithadhoc January 29, 2025 15:56
Copy link
Contributor

@rsmithadhoc rsmithadhoc left a comment

Choose a reason for hiding this comment

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

@Andrew565 For screen readers, it announced correctly and showed in the headings menu as expected.

However, I believe the heading styling is now getting overridden by .usa-label:
image

@Andrew565
Copy link
Contributor Author

Andrew565 commented Jan 29, 2025

However, I believe the heading styling is now getting overridden by .usa-label:

Good catch, thanks!

@Andrew565
Copy link
Contributor Author

Label header styles fixed.
Screenshot 2025-01-30 at 8 53 12 AM

@Andrew565 Andrew565 requested a review from rsmithadhoc January 30, 2025 14:07
@Andrew565 Andrew565 requested review from a team January 30, 2025 17:11
font-weight: inherit;

.usa-label--required {
font-family: "Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Technically, yes, but I'd have to re-define those variables within the va-textarea.scss file because those variables aren't available in Storybook yet.

Copy link
Contributor

@danbrady danbrady left a comment

Choose a reason for hiding this comment

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

Design approved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Patch change in semantic versioning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Headers (H1, H2, H3, etc) are not allowed as child of element label
5 participants