up-for-grabs.net icon indicating copy to clipboard operation
up-for-grabs.net copied to clipboard

Allow for dark mode toggling via keyboard

Open 06b opened this issue 3 years ago • 7 comments
trafficstars

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.

06b avatar Oct 21 '22 17:10 06b

@06b How can one change dark mode from keyboard with this? Which buttons?

ritwik12 avatar Dec 19 '22 11:12 ritwik12

@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 avatar Dec 19 '22 18:12 06b

@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?

shiftkey avatar Aug 27 '23 19:08 shiftkey

: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.

shiftbot avatar Aug 28 '23 00:08 shiftbot

@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 avatar Aug 28 '23 00:08 06b

@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...

shiftkey avatar Aug 28 '23 00:08 shiftkey

> 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

shiftkey avatar Aug 28 '23 00:08 shiftkey