-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Area:AccessibilityCategory for accessibility related features and bugsCategory for accessibility related features and bugsEnhancementImprovement to an existing featureImprovement to an existing feature
Description
Increasing access
Brings site up to modern CSS accessibility standards by reducing eye strain.
Most appropriate sub-area of p5.js?
- AccessibilityColorCore/Environment/RenderingDataDOMEventsImageIOMathTypographyUtilitiesWebGLBuild processUnit testingInternationalizationFriendly errorsOther (specify if possible)To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Feature enhancement details
CSS media feature is available to detect user's preference:
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
If feasible, apply to both the editor and the resource pages. Changing the theme in options overrides the default.
Metadata
Metadata
Assignees
Labels
Area:AccessibilityCategory for accessibility related features and bugsCategory for accessibility related features and bugsEnhancementImprovement to an existing featureImprovement to an existing feature
Activity
welcome commentedon Mar 13, 2024
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
welcome commentedon Mar 14, 2024
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.
rohanjadhav05 commentedon Jun 14, 2024
Hi @raclim, @lindapaiste, @nickcombs32 we can get the system's mode and initialise the mode with the reducer we are using to set the theme.
Which will help us to get the system mode by default and when user select the mode from the option we will change the mode. below I have added the dummy code for it, also will be raising a PR for this issue.
// will get system mode from this function
const getSystemTheme = () => {
const prefersDarkMode = window.matchMedia('(prefers-color-scheme: dark)')
.matches;
return prefersDarkMode ? 'dark' : 'light';
};
// system mode is present in variable systemTheme
const systemTheme = getSystemTheme();
// initialising the theme variable with the system's mode
theme: systemTheme
Please do let me know if there is anything to improve...
Thanks