Skip to content

Conversation

@hannahiss
Copy link
Member

@hannahiss hannahiss commented Jul 9, 2025

Note: Please transform - [ ] into - (NA) in the description when things are not applicable

Related issues

#2845

Fixes #3124

Description

Add the tag component, composed of two types : Tag and Input tag. Implement the version 1.3.0 of Tags with new colors, functional icons, etc. Add some accessibility explanations.

Motivation & Context

New Tag component

Types of change

  • New feature (non-breaking change which adds functionality)

Live previews

@netlify
Copy link

netlify bot commented Jul 9, 2025

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit 8502337
🔍 Latest deploy log https://app.netlify.com/projects/boosted/deploys/68df963321d7970008c82904
😎 Deploy Preview https://deploy-preview-3062--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Aniort
Copy link
Contributor

Aniort commented Sep 24, 2025

hello,
in "Overview", in the § "For accessibility and semantics reasons,.."
we must add at the end: "When the purpose of the tags is not clear enough (in particular without the visually context), an aria-label must be added to the <ul> tag to explain the tags function.

@vprothais
Copy link
Collaborator

hello, in "Overview", in the § "For accessibility and semantics reasons,.." we must add at the end: "When the purpose of the tags is not clear enough (in particular without the visually context), an aria-label must be added to the <ul> tag to explain the tags function.

@Aniort , you told us yesterday that we should use a visually hidden content in the first li on the list instead of an aria-label on the ul. In the end you prefer the aria-label ?

@vprothais vprothais requested a review from Copilot October 2, 2025 12:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements the Tag component for the OUDS Web design system, providing two types of tags: informative tags and interactive input tags. The implementation follows the OUDS design guidelines with support for various colors, states, icons, and accessibility features.

Key Changes

  • Complete Tag component implementation with both static and interactive variants
  • Comprehensive documentation with examples covering all tag features
  • Updated site navigation and migration guides to reflect the new component

Reviewed Changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scss/_tags.scss Complete rewrite of tag component styles with new design system tokens and interactive variants
site/src/content/docs/components/tags.mdx Full documentation implementation with examples and accessibility guidance
scss/_variables.scss Removal of old tag-related variables
site/src/pages/index.astro Updated homepage to showcase new tag component
site/src/layouts/partials/ExamplesMain.astro Applied consistent tag styling
site/src/content/docs/migrations/migration.mdx Added tag component to migration notes
site/src/content/docs/migrations/migration-from-boosted.mdx Updated migration guide with tag changes
site/src/components/shortcodes/Example.astro Added showToolbar prop for flexible example display
site/src/components/shortcodes/Code.astro Improved code block spacing
site/src/components/shortcodes/BootstrapCompatibility.astro Applied consistent tag styling
site/data/sidebar.yml Removed draft status from Tags component
.bundlewatch.config.json Updated bundle size limits to accommodate new component

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

OUDS Web [color and background utilities]([[docsref:/helpers/color-background]]) can be applied to display colored tag variants. Colors are classified in two hierarchies, emphasized (for key tags) or muted (for secondary tags), and each color has its own semantic purpose. Please follow the tag design guidelines to choose the right color for the right usage.

<Callout type="warning">
Keep in mind that color should not be the only way to convey information. If the color has strong meaning, reflect it in the tag's text or add additional text with the class `.visually-hidden`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The "or" at the end of this sentence could be misleading, adding visually accessible content is ok for screen readers, but won't be useful for people having trouble with color vision. We should do the first, and the second if needed.

background-color: #{$ouds-color-surface-status-neutral-muted} if($enable-important-utilities, !important, null);
}

.tag-loader { // TODO partially copied from button loader, should be factorized as much as possible
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this Todo still relevant, should we do that now or is it done and we should remove the comment ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Added a reminder here: #3152

@Aniort
Copy link
Contributor

Aniort commented Oct 2, 2025

hello
some point to add/correct :

  • add the text in bold in input tag/overview "For accessibility reasons, when inserting tags into a list, wrap the list in a semantic container (usually a <ul> or <ol>). If possible, display a semantically informative text to describe the tags' group purpose. If the purpose of the tags is not clear enough (especially without visual context) or not present, an aria-label must be added to the container to explain the function of the tags. Each input tag should contain a .visually-hidden text after the button text to indicate the action that will be performed when the tag is clicked."
  • add the text in bold in tag/overview "**For accessibility reasons, when inserting tags into a list, wrap the list in a semantic container (usually a <ul> or <ol>). If possible, display a semantically informative text to describe the tags' group purpose. If the purpose of the tags is not clear enough (especially without visual context) or not present, an aria-label must be added to the container to explain the function of the tags."

Copy link
Collaborator

@MaxLardenois MaxLardenois left a comment

Choose a reason for hiding this comment

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

Need to add a review to comment?

background-color: #{$ouds-color-surface-status-neutral-muted} if($enable-important-utilities, !important, null);
}

.tag-loader { // TODO partially copied from button loader, should be factorized as much as possible
Copy link
Collaborator

Choose a reason for hiding this comment

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

Added a reminder here: #3152

@boosted-bot boosted-bot moved this from Dev Review In Progress to Need Lead Dev Review in 🟣 [Orange-Boosted-Bootstrap] PRs Board Oct 6, 2025
@vprothais vprothais merged commit 85a8470 into ouds/main Oct 6, 2025
16 checks passed
@github-project-automation github-project-automation bot moved this from Need Lead Dev Review to Done in 🟣 [Orange-Boosted-Bootstrap] PRs Board Oct 6, 2025
@vprothais vprothais deleted the ouds/main-his-tag-component branch October 6, 2025 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚛️ component 📖 documentation Improvements or additions to documentation

Projects

Development

Successfully merging this pull request may close these issues.

[OUDS] Create component - Tags

6 participants