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-table: Parse html to plain string before setting it to CSS content #1431

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

ataker
Copy link
Contributor

@ataker ataker commented Dec 10, 2024

Chromatic

https://va-table-encode-header-string--65a6e2ed2314f7b8f98609d8.chromatic.com

Description

Closes [Mobile] va-table issue in mobile where HTML tags are displaying in headers #3503

For the mobile stacked va-table, the headers are set to the CSS content attribute, which is in plain text. If any HTML entities are passed they would show as unencoded, example: '&' becomes '&'. This adds a parser to have it display properly.

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

Before
Screenshot 2024-12-10 at 11 37 34
After
Screenshot 2024-12-10 at 11 37 53

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)

@ataker ataker added the patch Patch change in semantic versioning label Dec 10, 2024
@ataker ataker marked this pull request as ready for review December 10, 2024 16:48
@ataker ataker requested a review from a team as a code owner December 10, 2024 16:48
Copy link
Contributor

@powellkerry powellkerry left a comment

Choose a reason for hiding this comment

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

LGTM

@ataker ataker merged commit a5cc080 into main Dec 11, 2024
8 checks passed
@ataker ataker deleted the va-table-encode-header-string branch December 11, 2024 16:44
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.

[Mobile] va-table issue in mobile where HTML tags are displaying in headers
2 participants