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

Investigate considering some fonts as non-text content #1015

Open
Jym77 opened this issue Jan 3, 2022 · 4 comments
Open

Investigate considering some fonts as non-text content #1015

Jym77 opened this issue Jan 3, 2022 · 4 comments
Assignees
Labels
ACT-R Problems detected by ACT-R validation Research Task that need some investigation and experiment

Comments

@Jym77
Copy link
Contributor

Jym77 commented Jan 3, 2022

Some fonts, like Font Awesome, or Material Icons Two Tone, are replacing text by icons.
We should probably consider them as non-text content (assuming the font loads) to avoid false positives on SC and rules that only consider text (e.g. 1.4.4), …

@Jym77 Jym77 added the Research Task that need some investigation and experiment label Feb 14, 2022
@mdp-siteimprove
Copy link

this also seems to be an issue for 2.5.3 (Visible labels included in accessible names).
Visible labels sometimes include icons made with Material or something similar, but when comparing the visible label with aria-label, the icon text is included when doing the comparison (which of course is misleading, because the icon text is often very unrelated to the matter of the label)

@mdp-siteimprove
Copy link

Perhaps we should consider whether <i> tags should be ignored from all checks that relates to text?

@Jym77
Copy link
Contributor Author

Jym77 commented Apr 5, 2022

Yes, that will pretty much affect R14 which checks for 2.5.3.

I'm not up for straight out ignoring <i> elements, since they can be used for other things that icons (and the use for icons is already borderline and mostly a trick to have CSS i { font: font-awesome }). According to one of my favourite part of the HTML specs:

The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts.

So, <i>For Søren</i>, this is the <i>Millenium Falcon!</i> is the correct way to write things and is definitely text content…

@Jym77 Jym77 added the ACT-R Problems detected by ACT-R validation label Nov 21, 2023
@Jym77
Copy link
Contributor Author

Jym77 commented Nov 29, 2023

Some fonts, like Font Awesome, or Material Icons Two Tone, are replacing text by icons.

Check that these two fonts are indeed always non-text content, and ignore corresponding text in R14, R66, R69.
We can add morefont exception later.
May bring to the point where we'll want a isNonTextContentpredicate or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ACT-R Problems detected by ACT-R validation Research Task that need some investigation and experiment
Projects
Status: 📝 Ready
Development

No branches or pull requests

3 participants