Skip to content

Improve avatar status accessibility and update CSS hash - #232

Merged
coliff merged 2 commits into
mainfrom
dev/coliff/a11y-docs-fix
Jan 16, 2026
Merged

Improve avatar status accessibility and update CSS hash#232
coliff merged 2 commits into
mainfrom
dev/coliff/a11y-docs-fix

Conversation

@coliff

@coliff coliff commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces improvements to accessibility for avatar status indicators in the documentation, updates copyright years, and refreshes the Subresource Integrity (SRI) hash for the Modus Bootstrap CSS file. The main changes are grouped below:

Accessibility Enhancements:

  • Added role="status" and aria-label attributes to .avatar-status elements in avatar.md to improve accessibility for screen readers. [1] [2]

Documentation and Metadata Updates:

  • Updated copyright years from 2025 to 2026 for both Bootstrap and Modus Bootstrap in README.md.

Asset Integrity Maintenance:

  • Updated the SRI hash for Modus Bootstrap CSS in hugo.yml to match the latest release.

Added role and aria-label attributes to avatar status indicators for better accessibility in documentation examples. Updated the CSS SRI hash in hugo.yml to match the referenced stylesheet.
Copilot AI review requested due to automatic review settings January 16, 2026 12:26
@coliff coliff added the documentation Documentation additions, updates and corrections. label Jan 16, 2026
@coliff
coliff merged commit c1b747f into main Jan 16, 2026
20 checks passed
@coliff
coliff deleted the dev/coliff/a11y-docs-fix branch January 16, 2026 12:27

Copilot AI 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.

Pull request overview

This pull request updates accessibility attributes for avatar status indicators, refreshes copyright years to 2026, and updates the CSS Subresource Integrity hash. The PR addresses three distinct areas: accessibility enhancements for avatar components, documentation maintenance through copyright updates, and asset integrity verification.

Changes:

  • Added role="status" and aria-label attributes to avatar status indicators in documentation examples
  • Updated copyright years from 2025 to 2026 in README.md for both Bootstrap and Modus Bootstrap
  • Updated SRI hash for Modus Bootstrap CSS v2.3.1 in hugo.yml configuration

Reviewed changes

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

File Description
site/content/docs/v2/components/avatar.md Added ARIA attributes (role="status" and aria-label) to all avatar status indicator examples for accessibility
README.md Updated copyright years from 2025 to 2026 for Bootstrap and Modus Bootstrap
hugo.yml Updated CSS SRI hash for Modus Bootstrap v2.3.1 CDN resource

Comment on lines +73 to +85
<span class="avatar-status status-online" role="status" aria-label="Online"></span>
</span>
<span class="avatar">
<img class="avatar-img" src="https://github.com/coliff.png" alt="CO">
<span class="avatar-status status-offline"></span>
<span class="avatar-status status-offline" role="status" aria-label="Offline"></span>
</span>
<span class="avatar">
<img class="avatar-img" src="https://github.com/coliff.png" alt="CO">
<span class="avatar-status status-busy"></span>
<span class="avatar-status status-busy" role="status" aria-label="Busy"></span>
</span>
<span class="avatar">
<img class="avatar-img" src="https://github.com/coliff.png" alt="CO">
<span class="avatar-status status-away"></span>
<span class="avatar-status status-away" role="status" aria-label="Away"></span>

Copilot AI Jan 16, 2026

Copy link

Choose a reason for hiding this comment

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

The use of role="status" for avatar status indicators is semantically incorrect. The ARIA status role is intended for live regions that provide advisory information that changes dynamically (e.g., "5 results found" or "Saving..."). Avatar status indicators are static visual decorations that don't change content dynamically in the DOM.

For these purely decorative status indicators, consider one of these approaches:

  1. Use role="img" with aria-label if the status is important enough to be announced
  2. Use aria-hidden="true" if the status is conveyed through other means (e.g., the avatar is in a list that textually indicates status)
  3. If status needs to be announced, ensure the parent avatar element has appropriate accessible text that includes the status

The role="status" with its implicit aria-live="polite" will cause screen readers to announce these every time they encounter them, which may not be the intended behavior for static status indicators.

Copilot uses AI. Check for mistakes.
Comment on lines +96 to +112
<span class="avatar-status status-online" role="status" aria-label="Online"></span>
</span>
<span class="avatar avatar-sm">
<img class="avatar-img" src="https://github.com/coliff.png" alt="CO">
<span class="avatar-status status-online"></span>
<span class="avatar-status status-online" role="status" aria-label="Online"></span>
</span>
<span class="avatar">
<img class="avatar-img" src="https://github.com/coliff.png" alt="CO">
<span class="avatar-status status-online"></span>
<span class="avatar-status status-online" role="status" aria-label="Online"></span>
</span>
<span class="avatar avatar-lg">
<img class="avatar-img" src="https://github.com/coliff.png" alt="CO">
<span class="avatar-status status-online"></span>
<span class="avatar-status status-online" role="status" aria-label="Online"></span>
</span>
<span class="avatar avatar-xl">
<img class="avatar-img" src="https://github.com/coliff.png" alt="CO">
<span class="avatar-status status-online"></span>
<span class="avatar-status status-online" role="status" aria-label="Online"></span>

Copilot AI Jan 16, 2026

Copy link

Choose a reason for hiding this comment

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

The use of role="status" for avatar status indicators is semantically incorrect. The ARIA status role is intended for live regions that provide advisory information that changes dynamically (e.g., "5 results found" or "Saving..."). Avatar status indicators are static visual decorations that don't change content dynamically in the DOM.

For these purely decorative status indicators, consider one of these approaches:

  1. Use role="img" with aria-label if the status is important enough to be announced
  2. Use aria-hidden="true" if the status is conveyed through other means (e.g., the avatar is in a list that textually indicates status)
  3. If status needs to be announced, ensure the parent avatar element has appropriate accessible text that includes the status

The role="status" with its implicit aria-live="polite" will cause screen readers to announce these every time they encounter them, which may not be the intended behavior for static status indicators.

Copilot uses AI. Check for mistakes.
@coliff coliff added the docs label Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs documentation Documentation additions, updates and corrections.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants