Skip to content
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

fix(root): removed attribute sections if they aren't included #1237

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

GCHQ-Developer-741
Copy link
Contributor

@GCHQ-Developer-741 GCHQ-Developer-741 commented Dec 4, 2024

Summary of the changes

When our JSON docs are generated in the ic-ui-kit, any properties that have an object type cannot be set as attributes in regular HTML, thus are not given an attribute name in the auto-generated docs. To prevent rendering empty sections on the guidance site when this is the case, have added a check to the AttributeTable to not render a header/value when the value is not present (in this case when props do not have a corresponding attribute name)

Also added aria-role to wrapper of the ic-footer-links with the gov logos, to prevent automated a11y failures. Added this to code examples as well to show others how to do it.

Related issue

#1038 #1174 #1178

Checklist

added check if value exists before rendering section in the attribute table
Copy link

github-actions bot commented Dec 4, 2024

added role="list" to wrapper of footer-links to prevent a11y failures. Also added example to code
snippets to show how to do it
@GCHQ-Developer-741 GCHQ-Developer-741 merged commit 327fb20 into develop Dec 4, 2024
5 of 6 checks passed
@GCHQ-Developer-741 GCHQ-Developer-741 deleted the remove-missing-attributes branch December 4, 2024 14:18
@GCHQ-Developer-741 GCHQ-Developer-741 mentioned this pull request Dec 4, 2024
2 tasks
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.

3 participants