-
Notifications
You must be signed in to change notification settings - Fork 96
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
use Font Awesome fonts for icons #1319
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only downside of fixed pixel size is for users that need to change page zoom,as the icon does not scale.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that applies nowadays. CSS pixels are not the same as screen pixels, and when you zoom in on a web page, browsers will happily adjust text sizes even if they are declared in px.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this using Firefox and Chromium. The icon scales along with the text in both browsers when you zoom in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, when you zoom in in your browser that works. But vision impaired users normally have different font-sizes configured in their browsers.
In that case the web application using pixels is not always rendered correctly.
To test it with Chromium, for instance, go to Settings / Appearance. Then change Font Size that should be set to its default (
24
) to something like Huge72
just to test.In the GIF below, I'm showing SKOSMOS after changing the browser font size to Huge. Notice that the icon and the text are using the pixel size, ignoring that I've changed the font size (i.e. not relative like
em
orrem
). Then I'm changing the font size to1em
in the icon, and then1em
for the CSS root variable.There are other cases where the fixed pixel size doesn't work or gets in the way of users that with different configurations, but I remember this one because I use a large font size in some devices — family history of poor vision, so I've already learned how to use a screen reader, and try to promote WCAG 2.1/Section 508 (US)/Web Accessibility Standard (NZ)/good practices/etc whenever I can 😬
I tried using
em
during the Bootstrap 5 work, but the final result was different than Bootstrap 3, so it was simpler to just copy the values from Bootstrap 3. I think for now we should use this20px
, and if we need to support accessibility standards like WCAG we can create a new issue later and see what's required (I think Europe adopted WCAG 2.1 too, but I only worked with a11y in NZ & Brazil).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, thanks for the clarification and example. I first thought that you were commenting on the pixel value used in this PR just for a single icon, but this is a much more general issue which affects many elements in the Skosmos UI.
In fact we do have a requirement to follow WCAG level AA, or at least to document any deviations from it (there are many known a11y problems - and likely many unknown - in current Skosmos, unfortunately). There is an accessibility statement for Finto - in Finnish only - which contains a long list of known problems as well as aspects that have not been verified.
The best solution would probably be to avoid
px
sizes for fonts altogether. But implementing that should be planned in an issue and implemented as a PR (or several).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed! 👍 😀 Thanks @osma