Orange-Boosted-Bootstrap icon indicating copy to clipboard operation
Orange-Boosted-Bootstrap copied to clipboard

[Component] Update `badge` component (badge, badge count, badge icon (v1.2)

Open pylapp opened this issue 2 months ago • 9 comments

Description

Verbatim of @MaximeTonnerre

Release note:
- The component now has two states: Enabled and Disabled.
- Documentation has been updated and published in Zeroeight, with use case examples provided for every state.
- The colors and background tokens for the functional states of the positive and info statuses have been changed.
- The minimum required contrast ratio has been corrected from 3:1 to 4.5:1 between content (icon) and background for Enable state.
- Functional badges (Positive, Warning, Negative, Info) differ from non-functional ones: they can only use functional icons, while non-functional badges are not supported.
- For the “Status neutral” variant:
- The content token “color-content-on-status-neutral-emphasized” has been replaced by the token “color-content-inverse”
- The surface token “color-surface-status-neutral-emphasized” has been replaced by the token “color-surface-inverse-high”

Definition of Ready

To be defined

Definition of Done

To be defined

Resources

See internal Figma

pylapp avatar Oct 14 '25 06:10 pylapp

@hannahiss when testing in firefox mac, only in some cases, the icon is not centered within the badge (the other icons in the page seem fine):

Image Image

This seems ok in chrome, edge and safari on mac. I have not tested on a pc.

B3nz01d avatar Nov 21 '25 16:11 B3nz01d

For functionnal badges, the accessiilty § is not enough: "Keep in mind that color should not be the only way to convey information. In functional badges, the color has a strong meaning, it must be reflected in the badge's .visually-hidden associated text. Read more about badges accessibility here."

ît should be something like: "Keep in mind that color should not be the only way to convey information. In functional badges, the color has a strong meaning; it must be reflected in the badge's .visually-hidden associated text. Furthermore, for colorblind users and some visually impaired people, if there's more than one colored badge used in the same context, only colors convey information. In this case, an icon must be used to give the same information transmitted by the different colors. Read more about badges accessibility here." and perhaps we must add a clear example.

Aniort avatar Nov 24 '25 09:11 Aniort

Hello @B3nz01d , Thanks for the feedback, we already knew that it was already like that on some screens. It seems to be related to pixel density rather than the browser being used. Anyway we'll fix that, but it was already like that before and not something introduced with tokens update, so we decided not to wait for this fix to merge the token update. We took a look at the issue and tried some things, but it not as trivial as it could seems to be. I created this issue for the bug : https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/issues/3237

vprothais avatar Nov 24 '25 09:11 vprothais

On a PC eburo I get the same issues on all browsers (Chrome, Firefox, Edge) for the badge count, but no issues for the badge icon:

Image

B3nz01d avatar Nov 25 '25 09:11 B3nz01d

@B3nz01d Yes, but on mine, with Chrome and Firefox, it's just right:

Image Image

It seems to depend on the screen... So the problem is not simple.

NB: on wich branch/preview are you to have this old version of doc? You should test on ouds-main (https://ouds-main--boosted.netlify.app/orange/docs/0.5/components/badges/)

hannahiss avatar Nov 25 '25 10:11 hannahiss

Itested the current published 0.5 on main

B3nz01d avatar Nov 25 '25 10:11 B3nz01d

retested this last link and I get this:

Image Image

B3nz01d avatar Nov 25 '25 11:11 B3nz01d

I propose to continue discussion around the vertical shift in the corresponding issue : https://github.com/Orange-OpenSource/Orange-Boosted-Bootstrap/issues/3237 to avoid mixing update linked to the component and tokens with something that is not related to that.

vprothais avatar Nov 25 '25 13:11 vprothais

OK Design pour les badges disabled

jerome-regnier avatar Nov 25 '25 13:11 jerome-regnier