-
Couldn't load subscription status.
- Fork 4k
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
Conversation
🦋 Changeset detectedLatest commit: 764b564 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
4ab0458 to
3d16de8
Compare
3d16de8 to
fea7388
Compare
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this 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
altproperty - Updated the
Imagecomponent 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.
418bb46 to
6db443b
Compare
6db443b to
e8d6b98
Compare
e8d6b98 to
2160ac8
Compare
2160ac8 to
1cddd74
Compare
No description provided.