feat(core/best-practices): custom labels via data-label#5253
Draft
marcoscaceres wants to merge 3 commits intomainfrom
Draft
feat(core/best-practices): custom labels via data-label#5253marcoscaceres wants to merge 3 commits intomainfrom
marcoscaceres wants to merge 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends core/best-practices so authors can override the default “Best Practice” marker and summary heading via data-label, with accompanying spec coverage. It fits into ReSpec’s document-generation pipeline by customizing how practice markers and the generated best-practices summary are rendered.
Changes:
- Add
data-labelsupport for individual.practicelabmarkers. - Add
data-labelsupport for the#bp-summaryheading text. - Add a spec covering custom labels in generated summary entries.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/core/best-practices.js |
Adds custom-label handling for practice markers and summary headings, plus a French marker string. |
tests/spec/core/best-practices-spec.js |
Adds a spec asserting custom labels appear in summary items and heading text. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9f778e1 to
99a17f4
Compare
Contributor
Author
|
@copilot Can you confirm all your feedback has been addressed? Can you fix anything that was not addressed? |
…; add boxed practice test coverage Agent-Logs-Url: https://github.com/speced/respec/sessions/7c04e153-af93-4a0e-bfe4-3dc140064f8b Co-authored-by: marcoscaceres <870154+marcoscaceres@users.noreply.github.com>
Only set lang attribute on the bdi element when using the built-in l10n label. Custom data-label text inherits lang from its DOM context naturally, so forcing it can produce incorrect language metadata for assistive technology. Also adds test for boxed practice container with custom label.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3900