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

Innovation time - Github markdown model card details code highlighting #1581

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ghost
Copy link

@ghost ghost commented Oct 22, 2024

No description provided.

@ghost ghost self-assigned this Oct 22, 2024
@ghost
Copy link
Author

ghost commented Oct 22, 2024

Needs to have a custom theme for hightlight.js for WCAG accessibility with an appropriate contract ratio.

https://github.com/ericwbailey/a11y-syntax-highlighting

@ghost ghost added the enhancement New feature or request label Oct 22, 2024
@@ -58,7 +58,8 @@
"swagger-ui-react": "^5.17.14",
"swr": "^2.2.5",
"typescript": "5.5.3",
"uuid": "^10.0.0"
"uuid": "^10.0.0",
"react-syntax-highlighter": "15.5.0"
Copy link
Member

Choose a reason for hiding this comment

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

I'd expect there to be accompanying package-lock.json changes with installing a new package. Make sure those changes are also committed

<Box
component='code'
sx={{
backgroundColor: theme.palette.grey[200],
Copy link
Member

Choose a reason for hiding this comment

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

We should use a theme colour that works in both light and dark modes. A static colour will not work for both.

}}
{...props}
>
{language ? <SyntaxHighlighter language={language}>{children}</SyntaxHighlighter> : children}
Copy link
Member

Choose a reason for hiding this comment

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

Check that all colours used by this package conform to accessibility contrast requirements for both light and dark mode themes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant