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

Improve notifications page readability #2302

Merged
merged 1 commit into from
Dec 17, 2022
Merged

Conversation

NickColley
Copy link
Collaborator

@NickColley NickColley commented Dec 5, 2022

Use lowest possible contrast gray that meets WCAG requirements for very deemphasised text.

Removes the status toolbar when its a notification for your own toot

Makes the notification page more readable without compromising access as much.

Closes #2249

Screenshots

Light

Before After
notifications page with hard to read text in toot notification notifications page with clearer text and no buttons in toot notification

Light

Before After
notifications page with hard to read text in toot notification notifications page with clearer text and no buttons in toot notification

@NickColley NickColley changed the title Improve notifications page Improve notifications page readability Dec 5, 2022
@NickColley NickColley added the accessibility Accessibility (a11y) label Dec 5, 2022
@NickColley NickColley marked this pull request as ready for review December 5, 2022 18:12
@NickColley
Copy link
Collaborator Author

Think legit CI failure will update tests soon

@vercel
Copy link

vercel bot commented Dec 5, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
pinafore 🔄 Building (Inspect) Dec 17, 2022 at 0:41AM (UTC)

Copy link
Owner

@nolanlawson nolanlawson left a comment

Choose a reason for hiding this comment

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

Thanks a bunch, this largely LGTM, except for the circular var issue I mention above.

Sorry for taking so long to review, but I've had a bunch of stuff going on in my life. 😕 Also there are a deluge of PRs on Pinafore right now. But thanks again for your accessibility work!

@NickColley
Copy link
Collaborator Author

Don't worry about the time to review, maybe I can help review and merge some stuff in future?

@nolanlawson
Copy link
Owner

You have committer access, so you should be able to, yeah. :)

I will need to hand off this project at some time anyway if I'm being honest with myself: https://nolanlawson.com/2022/11/22/thoughts-on-mastodon/

Next step is probably to create a GitHub org for it.

@NickColley
Copy link
Collaborator Author

Okay when I tried to get the tests running locally I accidentally upgraded my machine to the latest Ubuntu version and bricked it but now I've got a fresh install (that's how they get ya) so will hopefully finish this soon.

Use lowest possible contrast gray that meets WCAG requirements for
very deemphasised text.

Makes the notification page more readable without compromising access.

Co-authored-by: Nolan Lawson <nolan@nolanlawson.com>
@NickColley
Copy link
Collaborator Author

@nolanlawson this is ready to merge once you're happy with it!

@nolanlawson
Copy link
Owner

I accidentally upgraded my machine to the latest Ubuntu version and bricked it

Sorry to hear about that. This is actually exactly why I finally learned to use Podman – it was too hard to get certain versions of Mastodon to work with my Ubuntu version.

FWIW, this is what I use:

podman run -dt -p 4002:4002 -p 3000:3000 -p 4000:4000 -p 10000:10000 -p 3035:3035 -v ~/workspace/pinafore:/mnt ubuntu:18.04

(Ubuntu 20.04 should also work.)

--very-deemphasized-link-color: #{rgba($anchor-color, 0.8)};
--very-deemphasized-text-color: #{lighten($main-bg-color, 32%)};
--very-deemphasized-text-color: #{lighten($main-bg-color, 44%)};
--very-deemphasized-link-color: var(--very-deemphasized-text-color);
Copy link
Owner

Choose a reason for hiding this comment

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

--very-deemphasized-link-color is redundant now that it's the same as --very-deemphasized-text-color. And it's only used in one place:

:global(.status-content.status-in-notification a, .status-content.status-in-notification a:hover) {
color: var(--very-deemphasized-link-color);
}

The impact of this is that links only have a color that differentiates them from the surrounding text if they're in a mention notification rather than a fav/boost notification:

Screenshot from 2022-12-17 09-36-50

Technically this does not meet WCAG link requirements since the only thing distinguishing the link is that they're underlined when you hover over them.

To be fair, though, the existing colors have the exact same problem:

Screenshot from 2022-12-17 09-42-45

Maybe it would be best to just use the same (blue) color as links in mention notifications? Or a slightly different shade of blue? We don't need to solve this in this PR, though, since it's a pre-existing issue.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

One approach might be to just turn links into plain text for these types of notifications and make it one big clickable area, but agreed existing issue that could be improved.

@nolanlawson
Copy link
Owner

LGTM, I had a couple nitpicks, but if you want to resolve them in this PR please go ahead, or else feel free to click the merge button and we can do it in another PR. Thanks!

@NickColley NickColley merged commit 3edfed9 into master Dec 17, 2022
@NickColley NickColley deleted the improve-notifications-page branch December 17, 2022 18:12
alice-werefox pushed a commit to alice-werefox/sema-werefox-cafe that referenced this pull request Apr 3, 2023
Use lowest possible contrast gray that meets WCAG requirements for
very deemphasised text.

Makes the notification page more readable without compromising access.

Co-authored-by: Nolan Lawson <nolan@nolanlawson.com>

Co-authored-by: Nolan Lawson <nolan@nolanlawson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Accessibility (a11y)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notification page has low contrast for toots
2 participants