up-for-grabs.net
up-for-grabs.net copied to clipboard
Allow for dark mode toggling via keyboard
The following changes were made:
- #912
- Adjusted the dark mode toggle to be accessible via keyboard navigation.
- #930
- Removed commented out light/dark mode styles from stylesheet.
- Removed inline styles being set via JavaScript back to the stylesheet.
- Set toggling of theme preference styling via
[data-theme-preference]attribute on the html element.
- Removed commented out light/dark mode styles from stylesheet.
@06b How can one change dark mode from keyboard with this? Which buttons?
@ritwik12 When the theme-selector button has keyboard focus a person can press either the space or enter key and it will toggle the styles.
@06b apologies for the delay in reviewing this, but it seems like there are conflicts here which I'm not sure how to resolve. Are you able to take a look at this branch and get it back to a working state?
:wave: I'm a robot checking the state of this pull request to save the human reviewers time. I don't see any changes under _data/projects/ so I don't have any feedback here.
As you make changes to this pull request, I'll re-run these checks.
@shiftkey Yeah, that didn't go as planned. If it's alright with you, I'll close this pull request and when I get sometime in the future I'll try again and ping you?
@06b all good, I've taken a shot at rebasing and squishing the history. I'll drop some notes in here about what I did but hopefully this branch gets us into a good spot for validating the changes...
> git checkout Dark-Mode-Toggling-Keyboard-Improvements
# fetch the latest changes from the base branch
> git fetch origin gh-pages
# clobber the history but leave the modified files between your branch and `gh-pages` in the working directory
> git reset origin/gh-pages
# there might be additional files here that require cleanup
> [stage files for commit]
# create a single commit with just the desired changes
> git commit
# force push to rewrite history
> git push --force-with-lease