Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add alt text support to card covers #3715

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

Merged
nolannbiron merged 6 commits into main from nolann/add-alt-support-for-cards
Oct 24, 2025
Merged

Conversation

@nolannbiron
Copy link
Member

@nolannbiron nolannbiron commented Oct 9, 2025

No description provided.

Copy link

changeset-bot bot commented Oct 9, 2025
edited
Loading

🦋 Changeset detected

Latest commit: 764b564

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@gitbook/react-openapi Patch
gitbook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nolannbiron nolannbiron force-pushed the nolann/add-alt-support-for-cards branch from 4ab0458 to 3d16de8 Compare October 23, 2025 15:18
@nolannbiron nolannbiron force-pushed the nolann/add-alt-support-for-cards branch from 3d16de8 to fea7388 Compare October 23, 2025 15:19
Copy link

argos-ci bot commented Oct 23, 2025
edited
Loading

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2 (Inspect) 👍 Changes approved 1 changed Oct 24, 2025, 1:18 PM
v2-cloudflare (Inspect) 👍 Changes approved 3 changed Oct 24, 2025, 1:21 PM
v2-vercel (Inspect) 👍 Changes approved 2 changed Oct 24, 2025, 1:20 PM

Copy link
Contributor

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 adds support for alternative text (alt attributes) to card cover images, improving accessibility for users relying on screen readers. The changes update the image type definitions to include an optional alt property and propagate this property through the component hierarchy.

Key Changes:

  • Extended image source type definitions to include an optional alt property
  • Updated the Image component to accept and apply alt text from multiple sources with fallback logic
  • Enhanced table record card cover processing to extract and pass through alt text values

Reviewed Changes

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

Show a summary per file
File Description
packages/gitbook/src/components/utils/Image.tsx Added alt property to image source types and implemented fallback logic for rendering alt text
packages/gitbook/src/components/DocumentView/Table/utils.ts Updated cover processing to extract and include alt text from image records
packages/gitbook/src/components/DocumentView/Table/RecordCard.tsx Passed alt text values to image sources for record card covers
packages/gitbook/src/components/DocumentView/InlineIcon.tsx Removed obsolete TypeScript error suppression comments
package.json Upgraded @gitbook/api dependency to version 0.146.0
.changeset/proud-kings-know.md Added changeset documentation for the feature

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

@nolannbiron nolannbiron force-pushed the nolann/add-alt-support-for-cards branch from 418bb46 to 6db443b Compare October 23, 2025 20:28
@nolannbiron nolannbiron force-pushed the nolann/add-alt-support-for-cards branch from 6db443b to e8d6b98 Compare October 24, 2025 09:04
@nolannbiron nolannbiron force-pushed the nolann/add-alt-support-for-cards branch from e8d6b98 to 2160ac8 Compare October 24, 2025 12:55
@nolannbiron nolannbiron merged commit f9f8011 into main Oct 24, 2025
16 checks passed
@nolannbiron nolannbiron deleted the nolann/add-alt-support-for-cards branch October 24, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

@conico974 conico974 conico974 approved these changes

@gregberge gregberge Awaiting requested review from gregberge

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /