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

fix: markup Banner components as regions #359

Merged
merged 1 commit into from
May 18, 2022
Merged

Conversation

gregtyler
Copy link
Contributor

Banner components are given the region role and an appropriate label to identify them.

The label is taken from, in order or priority:

  • The iconFallbackText label, if set
  • The type of banner (e.g. "success", "warning", "information")
  • The word "banner"

I also removed the visually-hidden insertion iconFallbackText to avoid duplication: if provided, this is now the region's label.

The only possible regression I can think of is if people have written iconFallbackText to flow as a full sentence with the text content, which would now be broken up. If someone strictly needed that behaviour, they can simply append the content to html.

@gregtyler gregtyler requested a review from a team as a code owner May 17, 2022 09:35
Banner components are given the region role and an
appropriate label to identify them.

The label is taken from, in order or priority:
- The `iconFallbackText` label, if set
- The type of banner (e.g. "success", "warning", "information")
- The word "banner"

I also removed the visually-hidden insertion
`iconFallbackText` to avoid duplication: if provided, this is
now the region's label.
@euhyung
Copy link

euhyung commented May 17, 2022

as an aside, I think we might want to review all currentColour / svg implementations for the inverted contrast mode / windows
IMG_3237

@gregtyler gregtyler merged commit d38fa96 into main May 18, 2022
@gregtyler gregtyler deleted the 86-banner-text-label branch May 18, 2022 09:15
gregtyler pushed a commit that referenced this pull request May 18, 2022
## [1.4.2](v1.4.1...v1.4.2) (2022-05-18)

### Bug Fixes

* markup Banner components as regions ([#359](#359)) ([d38fa96](d38fa96))
* use inline SVGs ([#360](#360)) ([1f89878](1f89878)), closes [#162](#162)
@gregtyler
Copy link
Contributor Author

🎉 This PR is included in version 1.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants