Skip to content

Added the glossary page#53

Open
G0dwin wants to merge 11 commits into
mainfrom
feature/glossary
Open

Added the glossary page#53
G0dwin wants to merge 11 commits into
mainfrom
feature/glossary

Conversation

@G0dwin
Copy link
Copy Markdown
Collaborator

@G0dwin G0dwin commented Mar 31, 2026

Adds the tools necessary to generate a glossary page and add it to the nav.

Dependent PR in act-rules to be published shortly.

Note: much of this was generated using Co-pilot, be on the lookout for code that doesn't meet standards.

Because we probably will not be able to preview this until after we merge the packages, I have a preview available on my personal site here.

Related PR: act-rules/act-rules.github.io#2395

Copy link
Copy Markdown
Contributor

@daniel-montalvo daniel-montalvo left a comment

Choose a reason for hiding this comment

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

Hi @G0dwin .

thanks for putting this together.

I think the act-tools repo should be the place to have this conversation, as this is were the logic lives.

I have a couple of thoughts based on previous work, especially act-rules/act-rules.github.io#2377 and w3c/wcag-act-rules#387

The URIs we settled on for these examples were: /act/rules/terms/accessible-name/examples/

This is because on the WAI website we have the pattern that every URI needs to be meaningful in itself.

If we include this work as-is, we would leave /act/rules/terms/ with no meaningful content, and we would be adding yet another pattern /act/rules/glossary/ which wouldn't meet user expectations.

I propose we rename /act-rules/glossary/ to /act/rules/terms/, just to avoid having two patterns repeated throughout.

In addition, I'd request review from @remibetin because these code updates are intended to push content to the WAI website, so he needs to be aware as the WAI website maintainer.

@G0dwin
Copy link
Copy Markdown
Collaborator Author

G0dwin commented Apr 6, 2026

Hi @G0dwin .

thanks for putting this together.

I think the act-tools repo should be the place to have this conversation, as this is were the logic lives.

I have a couple of thoughts based on previous work, especially act-rules/act-rules.github.io#2377 and w3c/wcag-act-rules#387

The URIs we settled on for these examples were: /act/rules/terms/accessible-name/examples/

This is because on the WAI website we have the pattern that every URI needs to be meaningful in itself.

If we include this work as-is, we would leave /act/rules/terms/ with no meaningful content, and we would be adding yet another pattern /act/rules/glossary/ which wouldn't meet user expectations.

I propose we rename /act-rules/glossary/ to /act/rules/terms/, just to avoid having two patterns repeated throughout.

In addition, I'd request review from @remibetin because these code updates are intended to push content to the WAI website, so he needs to be aware as the WAI website maintainer.

Thanks Daniel, I updated the URL and committed the change. You can preview it here.

@remibetin
Copy link
Copy Markdown

remibetin commented Apr 14, 2026

Thanks @daniel-montalvo and @G0dwin. I'll review the use of the WAI theme, and I've asked @kfranqueiro if he could review the Typescript updates. We plan to coordinate next week on this.

Copy link
Copy Markdown

@remibetin remibetin left a comment

Choose a reason for hiding this comment

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

Hi @G0dwin,

Thanks for your work on this. I've started the review and added some suggestions and questions.

To help with the review, I'm interested in more information on who the glossary page is intended for, and examples of use cases. AFAIK, each rule already includes a list of glossary terms with their definition. Will there be links to the glossary page somewhere else?

I also think the scope and purpose of the glossary page is important to convey to the end-users. For example, users may wonder how this relates to section 4.12 Glossary of ACT Rules Format 1.1. To that end, I suggest adding a "Summary" box at the top that provide this information. I can help refine the wording.

cc @daniel-montalvo @kfranqueiro

Comment thread src/cli/generate-glossary.ts Outdated
Comment thread src/cli/generate-glossary.ts Outdated
Comment on lines +104 to +117
lines.push("### Used in rules");

const rules = [...(usedInRules.get(key) || new Set())].sort((a, b) =>
a.id.localeCompare(b.id),
);
if (rules.length === 0) {
lines.push("- None");
} else {
rules.forEach((rule) => {
lines.push(
`- [${rule.name}](/standards-guidelines/act/rules/${rule.id}/proposed/)`,
);
});
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The "Used in Rules" list can become quite big and require a lot of scrolling from users. For example, the list for the "Outcome" term consists of 94 items.

Before considering possible solutions, could you clarify who this section is intended for?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I agree, this adds a large amount of visual space. I think embedding this content in summary and details elements is probably the best solution but I that would be assuming use cases myself. This came from the issue requirements:

In scope: New glossary index (and/or per-term pages), navigation entry, working anchors and links on WAI, “used in rules” lists with correct WAI rule URLs, full definition bodies as above.

I think it may also be a good option to move forward with the page as it is and adjust this later if it holds us up.

@WilcoFiers , do you have any context or suggestions to add here?

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.

Hi.

I am not even sure if we should have this "used in rules" at all.

I think the primary use case for a dedicated (self-contained) terms page is for rule authors to know whether or not something is or is not currently defined by ACT.

If you want to know which rules use which terms, you could get to the specific rule pages and see the terms at the bottom. I see this as a secondary need that is not worth the extra clutter.

If folks think strongly about keeping this, then I would support the details/summary alternative, but that should be done in alignment with how the expand/collapse single and expand/collapse multiple currently work on the wai website theme

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should keep this section. Yeah it's more for rule authors than other people, but this page is mostly for rule authors anyway. I'm okay with using a details / summary thing here.

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 second (or third?) keeping the "used in rules" section. It is a common use case for me to search all rules using a given definition, typically to assess which rules will be impacted by changes in the definition. I'm currently doing that somewhat manually through grep, which is not perfect due to transitive definition inclusion, … (and going through all rules pages is not a real possibility).

A details/summary is perfect for that, indeed.

(for a recent case: searching all rules that use "marked as decorative" to evaluate impact of "whitespace alt is decorative")

Comment thread src/cli/generate-glossary.ts Outdated
Comment thread src/cli/generate-glossary.ts Outdated
Comment thread src/cli/generate-glossary.ts Outdated
G0dwin and others added 5 commits April 28, 2026 15:13
Co-authored-by: Rémi Bétin <github@remibetin.fr>
Co-authored-by: Rémi Bétin <github@remibetin.fr>
Co-authored-by: Rémi Bétin <github@remibetin.fr>
Co-authored-by: Rémi Bétin <github@remibetin.fr>
Co-authored-by: Rémi Bétin <github@remibetin.fr>
Copy link
Copy Markdown
Member

@WilcoFiers WilcoFiers left a comment

Choose a reason for hiding this comment

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

Looks good. Couple nitpicks.

Comment thread src/utils/glossary.ts
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would you mind adding some tests for this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure!

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tests for src/utils/glossary.ts were added in commit 6aa3ade, covering getGlossaryHeading, normalizeHeadingLevels, and getGlossaryBody (both rule and full modes).

Comment on lines +10 to +13
export const getFullGlossary = (glossary: DefinitionPage[]): string => {
const glossaryTexts = glossary.map(getFullGlossaryMarkdown);
return joinStrings(`## Glossary`, ...glossaryTexts);
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are getFullGlossary and getFullGlossaryMarkdown just for testing? Seems unnecessary if that's the case. If we want to test the mode of getGlossaryBody we should test that function directly.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Great catch, I'll remove it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

getFullGlossary and getFullGlossaryMarkdown were removed in commit 6aa3ade.

@G0dwin
Copy link
Copy Markdown
Collaborator Author

G0dwin commented Apr 30, 2026

@copilot resolve the merge conflicts in this pull request

Co-authored-by: G0dwin <1109252+G0dwin@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI commented Apr 30, 2026

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflict with origin/main in commit 0b17c67. The conflict was in yarn.lock due to the pre-commit@fastify/pre-commit change on main. The lockfile was regenerated and all 270 tests pass.

@WilcoFiers WilcoFiers requested a review from daniel-montalvo May 7, 2026 14:33
@WilcoFiers WilcoFiers dismissed daniel-montalvo’s stale review May 7, 2026 14:33

Ready for another review

@remibetin
Copy link
Copy Markdown

remibetin commented Jun 4, 2026

Following today's ACT Task Force meeting, I'm providing an example where the definition of a term differs between the approved version of a rule and the proposed version.

The exception in the definition of "focusable" was updated on November 2024. See act-rules/act-rules.github.io@f9eace3

The term is used in numerous rules, including “Text has enhanced contrast”.

The proposed version of this rule, last updated on January 2026, uses the new definition.

The approved version of this rule, last updated on August 2023, uses the previous definition.

I haven't checked if some approved rules use the new definition.

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.

6 participants