Skip to content

feat(Avatar): support colorful#12460

Open
kmcfaul wants to merge 6 commits into
patternfly:mainfrom
kmcfaul:avatar-colorful
Open

feat(Avatar): support colorful#12460
kmcfaul wants to merge 6 commits into
patternfly:mainfrom
kmcfaul:avatar-colorful

Conversation

@kmcfaul

@kmcfaul kmcfaul commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What: Closes #12442

  • Adds color, initials, and children props to Avatar
  • Adds examples using direct svg, initials, and icons
  • Updates other Avatar examples to newer avatar icon & condense format of size example
  • Adds tests
  • Bumps core version to pull in avatar styles
    • Updates charts snaps that look to be changed from core bump cc @mcoker Is this expected?

Notes:

  • Since alt is a required prop for Avatar, repurposed alt to function as aria-label for children/initials structure (passing aria-label as well as alt should still function and override alt). LMK if we'd rather keep the props separate and make alt optional.
  • isBordered doesn't work with colorful (colorful has precedence over bordered modifier when both are applied). Should these modifiers be allowed to be used together?
  • Using children or initials without color prop looks off. Should we still be applying pf-m-colorful for the formatting without a color specified?

Summary by CodeRabbit

  • New Features

    • Avatar component now supports displaying initials as an alternative to images.
    • Avatar component supports customizable colors (red, orange, yellow, green, teal, blue, purple, gray).
    • Avatar component accepts custom content via children prop.
    • Enhanced accessibility with improved aria-label and aria-hidden handling.
  • Documentation

    • Added new examples demonstrating color modifiers, initials, and updated size variations.
  • Chores

    • Updated PatternFly dependency across packages.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

@patternfly/patternfly is bumped to 6.6.0-prerelease.8 across five package manifests. The Avatar component gains optional color, initials, and children props; it now conditionally renders a div (with ARIA attributes and color modifier classes) instead of an img when those props are present. New and updated example components and documentation sections cover the added functionality.

Changes

Avatar color, initials, and children support

Layer / File(s) Summary
PatternFly dependency bump
packages/react-core/package.json, packages/react-docs/package.json, packages/react-icons/package.json, packages/react-styles/package.json, packages/react-tokens/package.json
@patternfly/patternfly version updated from 6.5.2 to 6.6.0-prerelease.8 in all package manifests.
Avatar props and conditional rendering
packages/react-core/src/components/Avatar/Avatar.tsx
AvatarProps adds optional children, color (9-value string union), and initials. Avatar renders a div with role="img", conditional aria-label/aria-hidden, color modifier classes, and an initials span when initials or children are present; otherwise renders an img.
Tests for new Avatar behavior
packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx
Adds visibility assertions for initials and children rendering, parameterized color modifier CSS class checks, and accessibility tests for aria-label presence and aria-hidden across initials/children variants.
New and updated examples, docs, and layout CSS
packages/react-core/src/components/Avatar/examples/Avatar.md, packages/react-core/src/components/Avatar/examples/AvatarColorModifiers.tsx, packages/react-core/src/components/Avatar/examples/AvatarInitials.tsx, packages/react-core/src/components/Avatar/examples/AvatarBasic.tsx, packages/react-core/src/components/Avatar/examples/AvatarBordered.tsx, packages/react-core/src/components/Avatar/examples/AvatarSizeVariations.tsx, packages/react-core/src/components/Avatar/examples/avatar.css
Avatar.md reorganized with "Color modifiers" and "With initials" sections; AvatarColorModifiers and AvatarInitials example files added; existing examples updated to use the new SVG asset, icon child, and initials/color props; avatar.css adds flexbox layout for example containers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • mcoker
  • wise-king-sullyman
  • nicolethoen
  • thatblindgeye
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title "feat(Avatar): support colorful" accurately describes the main change - adding support for colorful avatars through new color, initials, and children props.
Linked Issues check ✅ Passed All objectives from issue #12442 are met: Avatar supports colorful icon styles via the color prop, nested/children rendering, initials rendering, and proper ARIA/API handling.
Out of Scope Changes check ✅ Passed All changes are directly related to Avatar colorful support. The dependency bumps and example updates align with the linked issue requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@patternfly-build

patternfly-build commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx (1)

75-92: ⚡ Quick win

Add a regression test for colorful-over-bordered precedence.

Current additions validate colorful classes, but not the contract that bordered must be omitted when colorful is used.

Suggested test
+test('Does not apply bordered modifier when color is used', () => {
+  render(
+    <Avatar alt="avatar" color="red" isBordered>
+      Test
+    </Avatar>
+  );
+  expect(screen.getByText('Test')).toHaveClass(styles.modifiers.colorful);
+  expect(screen.getByText('Test')).not.toHaveClass(styles.modifiers.bordered);
+});
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx` around
lines 75 - 92, Add a regression test in Avatar.test.tsx that verifies the
"colorful-over-bordered" precedence by rendering <Avatar alt="avatar"
color="red" bordered> (or iterate colors with test.each) and asserting the
rendered node has styles.modifiers.colorful (or styles.modifiers[color]) and
does NOT have styles.modifiers.bordered; place the test near the existing color
tests and use screen.getByText('Test') for assertions to match the current test
patterns.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/react-core/src/components/Avatar/Avatar.tsx`:
- Around line 37-43: avatarClasses is built including isBordered unconditionally
which causes pf-m-bordered to persist for colorful avatars; update the logic so
bordered is only applied when color is not set. For example, keep the existing
avatarClasses for the non-colorful branch (use css(styles.avatar,
styles.modifiers[size], isBordered && styles.modifiers.bordered, className)) but
for the colorful branch compute a separate class list (e.g., baseColored =
css(styles.avatar, styles.modifiers[size], className) or reuse avatarClasses
without the bordered modifier) and use that when rendering the color path so
styles.modifiers.bordered is not included when color is truthy; reference
avatarClasses, styles.modifiers.bordered, isBordered and the color branch where
css(avatarClasses, color && styles.modifiers.colorful, color &&
styles.modifiers[color]) is used.

---

Nitpick comments:
In `@packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx`:
- Around line 75-92: Add a regression test in Avatar.test.tsx that verifies the
"colorful-over-bordered" precedence by rendering <Avatar alt="avatar"
color="red" bordered> (or iterate colors with test.each) and asserting the
rendered node has styles.modifiers.colorful (or styles.modifiers[color]) and
does NOT have styles.modifiers.bordered; place the test near the existing color
tests and use screen.getByText('Test') for assertions to match the current test
patterns.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 94ebea1f-1682-44bc-8b86-ef1a67268557

📥 Commits

Reviewing files that changed from the base of the PR and between 8b528bb and 6e56f07.

⛔ Files ignored due to path filters (2)
  • packages/react-core/src/components/assets/img_avatar-light.svg is excluded by !**/*.svg
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (15)
  • packages/react-core/package.json
  • packages/react-core/src/components/Avatar/Avatar.tsx
  • packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx
  • packages/react-core/src/components/Avatar/examples/Avatar.md
  • packages/react-core/src/components/Avatar/examples/AvatarBasic.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarBordered.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarColorful.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarIcons.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarInitials.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarSizeVariations.tsx
  • packages/react-core/src/components/Avatar/examples/avatar.css
  • packages/react-docs/package.json
  • packages/react-icons/package.json
  • packages/react-styles/package.json
  • packages/react-tokens/package.json

Comment on lines +37 to +43
const avatarClasses = css(styles.avatar, styles.modifiers[size], isBordered && styles.modifiers.bordered, className);

if (initials || children) {
return (
<div
className={css(avatarClasses, color && styles.modifiers.colorful, color && styles.modifiers[color])}
role="img"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Colorful avatars currently still keep pf-m-bordered when isBordered is true.

Line 37 builds avatarClasses with isBordered unconditionally, and Line 42 reuses it in the colorful path. That violates the documented behavior that colorful styling takes precedence over bordered.

Proposed fix
-  const avatarClasses = css(styles.avatar, styles.modifiers[size], isBordered && styles.modifiers.bordered, className);
+  const baseAvatarClasses = css(styles.avatar, styles.modifiers[size], className);

   if (initials || children) {
     return (
       <div
-        className={css(avatarClasses, color && styles.modifiers.colorful, color && styles.modifiers[color])}
+        className={css(
+          baseAvatarClasses,
+          !color && isBordered && styles.modifiers.bordered,
+          color && styles.modifiers.colorful,
+          color && styles.modifiers[color]
+        )}
         role="img"
         aria-label={alt}
         {...props}
       >
@@
-  return <img src={src} alt={alt} className={avatarClasses} {...props} />;
+  return <img src={src} alt={alt} className={css(baseAvatarClasses, isBordered && styles.modifiers.bordered)} {...props} />;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/react-core/src/components/Avatar/Avatar.tsx` around lines 37 - 43,
avatarClasses is built including isBordered unconditionally which causes
pf-m-bordered to persist for colorful avatars; update the logic so bordered is
only applied when color is not set. For example, keep the existing avatarClasses
for the non-colorful branch (use css(styles.avatar, styles.modifiers[size],
isBordered && styles.modifiers.bordered, className)) but for the colorful branch
compute a separate class list (e.g., baseColored = css(styles.avatar,
styles.modifiers[size], className) or reuse avatarClasses without the bordered
modifier) and use that when rendering the color path so
styles.modifiers.bordered is not included when color is truthy; reference
avatarClasses, styles.modifiers.bordered, isBordered and the color branch where
css(avatarClasses, color && styles.modifiers.colorful, color &&
styles.modifiers[color]) is used.

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just add isInline to the <Icon> components in the examples. The other comments are nits/questions.

#ws-react-c-avatar-with-svgs,
#ws-react-c-avatar-with-initials,
#ws-react-c-avatar-with-icons {
display: flex;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd also add flex-wrap: wrap so these wrap if there isn't enough space. An alternative is to remove the flex CSS and put spaces between the avatars in the examples, I think I've seen it done like {' '} before.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added the wrap, we have done {' '} before but sometimes prettier formats things oddly when that's used.

Comment on lines +7 to +9
<Icon size="xl">
<RhUiAiChatbotIcon />
</Icon>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should probably review this with design, to see if using an icon as a child is a use case and if we need to change the icon size so it isn't clipped by the circle shape.

If you add isInline and leave the size it will fix the icon color

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Using an icon is the use case for chatbot. It may not need to be in an Icon but that's the easiest way to adjust the size that I could see.

Comment thread packages/react-core/src/components/Avatar/examples/AvatarInitials.tsx Outdated
@mcoker

mcoker commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Updates charts snaps that look to be changed from core bump cc @mcoker Is this expected?

@kmcfaul yupp! Chart color tokens with transparency use rgb() instead of rgba() now due to some new stylelint rules in core.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/react-core/src/components/Avatar/examples/Avatar.md`:
- Line 53: Fix the spelling error in the Avatar.md file where "guildelines" is
misspelled. Change "guildelines" to "guidelines" in the sentence about the
avatar children example to ensure the documentation text is correctly spelled.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0d99ee55-b42f-4bf7-a18c-afaec10c4cbf

📥 Commits

Reviewing files that changed from the base of the PR and between 25e2682 and 9098897.

⛔ Files ignored due to path filters (9)
  • packages/react-charts/src/victory/components/ChartContainer/__snapshots__/ChartContainer.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartDonut/__snapshots__/ChartDonut.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartDonutUtilization/__snapshots__/ChartDonutThreshold.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartDonutUtilization/__snapshots__/ChartDonutUtilization.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartLegend/__snapshots__/ChartLegend.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltip.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartPoint/__snapshots__/ChartPoint.test.tsx.snap is excluded by !**/*.snap
  • packages/react-core/src/components/assets/img_avatar-light.svg is excluded by !**/*.svg
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (14)
  • packages/react-core/package.json
  • packages/react-core/src/components/Avatar/Avatar.tsx
  • packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx
  • packages/react-core/src/components/Avatar/examples/Avatar.md
  • packages/react-core/src/components/Avatar/examples/AvatarBasic.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarBordered.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarInitials.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarSizeVariations.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarWithChildren.tsx
  • packages/react-core/src/components/Avatar/examples/avatar.css
  • packages/react-docs/package.json
  • packages/react-icons/package.json
  • packages/react-styles/package.json
  • packages/react-tokens/package.json
✅ Files skipped from review due to trivial changes (2)
  • packages/react-styles/package.json
  • packages/react-core/src/components/Avatar/examples/avatar.css
🚧 Files skipped from review as they are similar to previous changes (7)
  • packages/react-tokens/package.json
  • packages/react-docs/package.json
  • packages/react-icons/package.json
  • packages/react-core/package.json
  • packages/react-core/src/components/Avatar/tests/Avatar.test.tsx
  • packages/react-core/src/components/Avatar/Avatar.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarSizeVariations.tsx

Comment thread packages/react-core/src/components/Avatar/examples/Avatar.md Outdated
@rebeccaalpert rebeccaalpert self-requested a review June 16, 2026 20:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/react-core/src/components/Avatar/examples/Avatar.md`:
- Around line 17-33: The documentation for Avatar examples with children and
initials does not clearly explain that the alt property remains required for
accessibility. Add clarification in the text before or after the AvatarBasic.tsx
and AvatarColorModifiers.tsx examples (in the sections describing Pass in the
src property and With initials) to explicitly state that alt is required for all
Avatar variants and that it serves as the accessible name (becoming the
aria-label) when the Avatar is rendered with children or initials instead of an
image. This ensures users understand that alt cannot be omitted for non-image
variants.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1ef713cd-6627-4e99-8f19-e8f5d7e01c85

📥 Commits

Reviewing files that changed from the base of the PR and between 9098897 and a9a8e7c.

⛔ Files ignored due to path filters (10)
  • packages/react-charts/src/victory/components/ChartContainer/__snapshots__/ChartContainer.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartDonut/__snapshots__/ChartDonut.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartDonutUtilization/__snapshots__/ChartDonutThreshold.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartDonutUtilization/__snapshots__/ChartDonutUtilization.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartLegend/__snapshots__/ChartLegend.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartLegendTooltip/__snapshots__/ChartLegendTooltip.test.tsx.snap is excluded by !**/*.snap
  • packages/react-charts/src/victory/components/ChartPoint/__snapshots__/ChartPoint.test.tsx.snap is excluded by !**/*.snap
  • packages/react-core/src/components/assets/img_avatar-light.svg is excluded by !**/*.svg
  • packages/react-core/src/components/assets/rhds.svg is excluded by !**/*.svg
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (14)
  • packages/react-core/package.json
  • packages/react-core/src/components/Avatar/Avatar.tsx
  • packages/react-core/src/components/Avatar/__tests__/Avatar.test.tsx
  • packages/react-core/src/components/Avatar/examples/Avatar.md
  • packages/react-core/src/components/Avatar/examples/AvatarBasic.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarBordered.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarColorModifiers.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarInitials.tsx
  • packages/react-core/src/components/Avatar/examples/AvatarSizeVariations.tsx
  • packages/react-core/src/components/Avatar/examples/avatar.css
  • packages/react-docs/package.json
  • packages/react-icons/package.json
  • packages/react-styles/package.json
  • packages/react-tokens/package.json
✅ Files skipped from review due to trivial changes (3)
  • packages/react-styles/package.json
  • packages/react-docs/package.json
  • packages/react-core/src/components/Avatar/examples/AvatarBasic.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/react-tokens/package.json
  • packages/react-icons/package.json
  • packages/react-core/src/components/Avatar/tests/Avatar.test.tsx
  • packages/react-core/package.json
  • packages/react-core/src/components/Avatar/Avatar.tsx

Comment on lines +17 to +33
Pass in the `src` property to apply an image for the avatar, or pass `children` for custom content such as icons or svg elements.

```ts file="./AvatarBasic.tsx"

```

### Color modifiers

Color modifiers add visual interest and automatically include a border. The available colors are: "red", "orangered", "orange", "yellow", "green", "teal", "blue", "purple", and "gray".

```ts file="./AvatarColorModifiers.tsx"

```

### With initials

An avatar can display initials by using the `initials` property. It's recommended to pass only a single initial to ensure the text fits inside of the avatar.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Call out the alt/aria-label contract here.

The new children and initials examples should say that alt is still required for Avatar and becomes the accessible name unless aria-label is provided. Right now the docs read like alt can be omitted for the non-image variants.

Suggested text
- Pass in the `src` property to apply an image for the avatar, or pass `children` for custom content such as icons or svg elements.
+ Pass in the `src` property to apply an image for the avatar. When using `children` or `initials`, keep `alt` for the accessible name unless `aria-label` is provided.

Based on PR objectives: alt remains required but is repurposed to act as aria-label when Avatar is rendered with children or initials.

🧰 Tools
🪛 LanguageTool

[style] ~33-~33: This phrase is redundant. Consider using “inside”.
Context: ... single initial to ensure the text fits inside of the avatar. ```ts file="./AvatarInitia...

(OUTSIDE_OF)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/react-core/src/components/Avatar/examples/Avatar.md` around lines 17
- 33, The documentation for Avatar examples with children and initials does not
clearly explain that the alt property remains required for accessibility. Add
clarification in the text before or after the AvatarBasic.tsx and
AvatarColorModifiers.tsx examples (in the sections describing Pass in the src
property and With initials) to explicitly state that alt is required for all
Avatar variants and that it serves as the accessible name (becoming the
aria-label) when the Avatar is rendered with children or initials instead of an
image. This ensures users understand that alt cannot be omitted for non-image
variants.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avatar - support for new colorful icons and nested structure

4 participants