Jump to content

Wikipedia talk:Manual of Style/Accessibility

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Alt text for icons in templates

[edit]

How should a template handle alt text on an icon, if the icon can be changed? Some templates need |alt= parameters for selectable images, but what about a template where the image should be purely decorative? Should it have an |alt= parameter, or should it use the same alt text consistently?

I'm asking about general best practices but will link examples that brought this up. {{Archive}} has a little filing cabinet icon, but this can be changed to anything. An alt parameter and link parameter were added after this edit request: Template talk:Archives/Archive 1#Accessibility improvement for image. I'm thinking though that it would likely be more straightforward to just always have the alt text be something like "archiving icon". I've searched through pages that make use of the "alt" parameter. It's rarely used and when it is used, it is usually "Icon of a filing cabinet". I've listed several examples of its usage below.

Page Alt text Image Description
Wikipedia talk:WikiProject Computing/Computer Programming task force/Archive Index File:Replacement filing cabinet.svg File:Replacement filing cabinet.svg Icon of a filing cabinet
User talk:Jsayre64 Oregon File:Oregon DEM relief map.gif Small map of Oregon
Template talk:Jct Jct File:Jct plate.svg License plate reading "JCT"
User talk:XAM2175/2023/06 Icon of a filing cabinet File:Replacement filing cabinet.svg Icon of a filing cabinet

Useful parameter or simpler to use standardized alt text regardless of icon image? Rjjiii (talk) 20:51, 23 August 2024 (UTC)[reply]

Yeah making the alt text "Archiving icon" sounds sensible to me. Graham87 (talk) 04:04, 24 August 2024 (UTC)[reply]
Purely decorative images should have no link and no alt text according to accessibility experts since ever. What's the concern with that option? Izno (talk) 04:10, 7 September 2024 (UTC)[reply]
If the template allows the image to be chosen on the page where it's used, an editor can choose an image that is not public domain or available under an equivalent license. All creative commons images need to link to the page with their attribution information. Rjjiii (talk) 04:33, 7 September 2024 (UTC)[reply]
The |alt= and |link= parameters are unrelated; the value of one does not affect the meaning of the other. Setting |link= to an empty string can be a problem. If use of the image requires attribution (this includes, but is not limited to, the CC BY and CC BY-SA licenses), we must be able to reach the file description page so that the attribution may be seen. Indeed, WP:EIS#Link says: Except for public-domain images, it must always be possible for the reader to reach the image-description page, so |link= should be used only with |thumb images. Setting |alt= to an empty string does not, of itself, violate any policies so is much less of an issue. But if Graham87 suggests |alt=Archiving icon, I would go with that 100%. --Redrose64 🌹 (talk) 09:16, 7 September 2024 (UTC)[reply]
Typically, though, there would already be a text heading or description conveying the same information. In that case, having alt text on the decorative image that replicates the text is superfluous. isaacl (talk) 15:43, 7 September 2024 (UTC)[reply]
If the image in a template like this needs to be linked for attribution, it'd be better if there was alt text on the image (despite its slight redundancy). Graham87 (talk) 09:10, 8 September 2024 (UTC)[reply]

Mobile skin and block quotations

[edit]

Page watchers may be interested in Wikipedia talk:Manual of Style § Mobile skin and block quotations. Please feel free to participate there. Izno (talk) 04:07, 7 September 2024 (UTC)[reply]

WP:NOBR notes

[edit]

are there any acceptable uses for the HTML line break <br/>? on a recent edit of mine, I substituted a {{ubl}} template into the HTML line break, as this was not being used for a list but as a visual break for the default size, separating the series title from the year in a table, for visual harmony.

I have seen this sort of visual break in many articles that I have edited, especially less cared ones, but how should it be handled? is it COMPLETELY discouraged it, even for use cases where there is legitemately no factor other than aesthetics or what to do instead? Juwan (talk) 12:21, 19 September 2024 (UTC)[reply]

Not to hock my own slogan, but essentially as I understand it, break means pause. That is to say, line breaks are acceptable when they actually represent semantic breaks in content, perhaps roughly equivalent to a paragraph break. They should neither be used to create the appearance of lists nor to manually wrap a single block of text, but beyond that there are actually plenty of plausible applications. Infobox templates themselves actually use them a lot under the hood. Remsense ‥  12:24, 19 September 2024 (UTC)[reply]
oh, that's actually a great essay! if you think it is appropriate please link it on the section, that's exactly what I was looking for. Juwan (talk) 12:49, 19 September 2024 (UTC)[reply]
It's incomplete at the moment, and I like the idea that others would link such things rather than me if they find it useful so that only useful things get linked, so if you think it would help others then go for it! Remsense ‥  12:56, 19 September 2024 (UTC)[reply]
Line breaks are for visual appearance only, and so semantically they are equivalent to whitespace. Appropriate semantic markup should be used as applicable. Line breaks should be used sparingly. As browser widths change or other elements are added to the page, the page will automatically be laid out differently by browsers, and manual overrides can work against this process producing a pleasing result. isaacl (talk) 18:40, 19 September 2024 (UTC)[reply]

Where to place accessibility templates on problem templates

[edit]

The section on color suggests placing the {{Overcolored}} template at the top of articles with contrast issues. What about templates. For example, the {{Transport in Mexico City}} template has major issues with contrast. But if I place the template at the top of the template itself, it will appear on dozens of pages, which would be disruptive. I wound up placing it on the Transport in Mexico City template talk page at the top of my topic.

It would be good to clarify this in the text as to where it would best be placed in templates.

Thisisnotatest (talk) 06:14, 26 September 2024 (UTC)[reply]

I would put it on the doc page as well. If there's not a maintenance category for templates with accessibility issues, maybe it should be created and populated! I would personally appreciate that. Remsense ‥  07:04, 26 September 2024 (UTC)[reply]
Place it in the template, either in the documentation, or if it doesn't, then at the bottom between the noinclude tags. Gonnym (talk) 08:31, 26 September 2024 (UTC)[reply]
Thank you! I've moved it to the template documentation as well as added it to a related template. That's what I will do moving forward. Thisisnotatest (talk) 07:21, 27 September 2024 (UTC)[reply]

Looping GIFs and accessibility

[edit]

My edit Animations: Clarified 5 seconds as total playing time was reverted by Remsense with the comment "This is confusing to me: are looping GIFs simply not allowed?"

Rather than risking getting into an edit war, I am moving the matter here to attempt to gain consensus on wording before proposing a final edit.

WCAG 2.1 provides Technique G152: Setting animated gif images to stop blinking after n cycles (within 5 seconds)

Looping GIFs are permitted as long as they stop looping such that the total animation time is 5.0 seconds or less. So:

  • A 1 second long animated GIF could loop 5 times
  • A 1.5 second long animated GIF could loop 3 times
  • A 2 or 2.5 second long animated GIF could only loop twice
  • A 3 second long animated GIF could not loop at all
  • Endlessly looping animated GIFs are not permitted at all

Hope that makes it clear (which I believe the current page wording does not do).

Thisisnotatest (talk) 07:11, 27 September 2024 (UTC)[reply]

Suffice it to say, this does require conversation as almost no one operates based on this understanding, even if it's well-founded. Remsense ‥  07:13, 27 September 2024 (UTC)[reply]
From what I understand, and I'm woefully underread in the literature so this is partially anecdotal so forgive me, there is a significant distinction in accessibility between short animations that loop and long animations. SC 2.2.2: Pause, Stop, Hide says
The operative sentence uses the word "blinking" in a manner I find to be a bit vague: I would intuit some distinction many people would perceive between "blinking", merely "looping", and "ongoing" animated content in terms of its potential to interfere with their ability to focus or comfortably read? Later, "blinking" is defined as "content that causes a distraction problem", which is unfortunately a bit circular for our purposes. If blinking is coterminous with moving, why isn't moving used? Remsense ‥  07:22, 27 September 2024 (UTC)[reply]
As I understood it at the time that the HTML BLINK element was first deprecated, it's because certain blink rates can trigger seizures. I've never heard of a looped animation doing that, unless the animation is essentially two images displayed alternately. --Redrose64 🌹 (talk) 08:20, 27 September 2024 (UTC)[reply]
It doesn't only say blinking, it also says moving or scrolling. The area of concern is "The intent of this Success Criterion is to avoid distracting users during their interaction with a Web page." Long form animations need to be done via a pauseable video rather than by an uncontrollable animated GIF. Thisisnotatest (talk) 09:57, 27 September 2024 (UTC)[reply]
I'm just trying to fully understand what SC 2.2.2 says and why. Most concretely, it says:
  • Content that moves or auto-updates can be a barrier to anyone who has trouble reading stationary text quickly as well as anyone who has trouble tracking moving objects. It can also cause problems for screen readers.
  • Moving content can also be a severe distraction for some people. Certain groups, particularly those with attention deficit disorders, find blinking content distracting, making it difficult for them to concentrate on other parts of the Web page.
The first point is about moving content in general, and doesn't really apply to our conversation about looping GIFs in particular. The second specifically discusses blinking content, which is the distinction I'm currently unclear about. Remsense ‥  10:04, 27 September 2024 (UTC)[reply]
I do find it odd that they seem to focus on blinking so much. The issue is that if anything on my screen is animating when I am trying to read some other content on the page, then I will have difficulty concentrating on that other content. It doesn't matter whether the animated content is blinking or showing how an oil rig operates. If I have no way to stop it, I can't focus on the content that I'm interested in focusing on.
I've seen reports of usability tests where people will hold their hand up to obscure the unstoppable animation, and I've done that too. That assumes an abled person who can hold their hand up for an extended period of time; someone who is both attention challenged and arm-mobility disabled would not have that workaround. It still would take some of their/my attention away from trying to absorb the content of interest. And it's making the site visitor adapt to the site rather than the site adapting to the visitor. Hope that makes it clear. Thisisnotatest (talk) 23:51, 29 September 2024 (UTC)[reply]
Certainly. As I admitted, my previous understanding was based partially on my own anecdotal experience, where I can only recall those in my life having spoken about an inability to focus amid stimulus I would have characterized as "blinking" or "ongoing" above, rather than "looping". Of course, I don't doubt at all that the problem would cover that area also—there was just enough of a question in my mind that I felt it appropriate to make explicit.
General question I may cross-post to WP:VPT: what feasibility would there be in building a tool that can help us accomplish this task? It would seem to require transcoding every GIF on a live page to a video—there's no real advantage to using GIFs at all, right? Remsense ‥  23:58, 29 September 2024 (UTC)[reply]

Do we need to call out team and transit colors under color?

[edit]

I notice a lot of issues on Wikipedia where text has contrast issues because someone has duplicated team or transit route colors. Do we want to specifically mention that using team and transit colors for text is not exempt from meeting contrast requirements, and that accessibility takes precedence over non-logo branding?

Team example

Geelong West Giants uses white text on a orange background extensively. Orange text or backgrounds are particularly problematic because white on orange fails WCAG 2.x contrast test, but some people find orange on black harder to read. The logo doesn't need to meet contrast, but text does. The best practice would likely be to abandon the orange background.
The color #FFFFFF (white) on #F15C22 (orange) has a contrast of 3.33:1, which fails for text smaller than 18.66px bold or 24px not bold.

Transit example

{{Transport in Mexico City}} themes colors by route and mode. Several of the routes use insufficient contrast, such as Cablebús line 1, which has white on light blue, which violates contrast at all sizes.
The color #FFFFFF (white) on #4EC3E0 (light blue) has a contrast of 2.05:1, which fails for text at all sizes. This issue is complicated that the icon is supplied by the government of Mexico City, but the license permits modification, such as making the "1" black instead of white (changing fill="#FFFFFF" to fill="#000000" in the SVG code). But it might be simpler and less distracting to use actual text rather than an SVG image.

Thisisnotatest (talk) 21:24, 27 September 2024 (UTC)[reply]

These colors have always been horrible, and not only for accessibility reasons. Look at Template:Geelong Football League, the hyperlink in title is completely hidden. Gonnym (talk) 21:32, 27 September 2024 (UTC)[reply]
Many years ago, the ice hockey WikiProject moved to using colour borders instead of colour backgrounds in order to improve accessibility (including legibility). See Template:Montreal Canadiens for an example. (Some ice hockey editors don't like how it looks, while others do, but the consensus has held.) I feel this approach is a reasonable tradeoff between visual design goals, and should be considered for other similar scenarios. isaacl (talk) 16:22, 28 September 2024 (UTC)[reply]
I don't see the point of it. It's a digression. I mean, I guess the people doing it think it adds a coolness factor, but this isn't TikTok. We aren't here to be cool, and we're here to be informative, and coolness is a distraction from that.
When we have a list of the names of fruits, we don't precede each one by an icon depicting the fruit. List of typefaces (thank the forces that be) doesn't display the name of each typeface in that typeface. But some people, when they create or see a list of countries, they feel the impulse to prefix each name with the country's flag, as though every mention of a country merits another reminder to the reader of what that country's flag looks like. This situation is the same. It's an encyclopedia, not a font catalog or sports journal or score sheet. Identify typefaces, countries, routes, teams, etc., by name, without decoration. And not only do the color embellishments serve no useful purpose but, as you note, they break accessibility. Largoplazo (talk) 17:13, 28 September 2024 (UTC)[reply]
Funny enough, I'd much rather List of typefaces show examples of how each typeface looks like (and I actually do believe that is informative), than see another list with a country flag in it. Gonnym (talk) 10:27, 29 September 2024 (UTC)[reply]
So what is the path forward for this?
How do we get consensus to move all sports templates to the ice hockey model? Do we need a bot to make this edit, given that hundreds of pages are involved? Further, some of this styling has carried over to section headings in the manually edited content, for instance the table headings on Geelong West Giants.
And what would be a solution for transit? I'm happy to go in to, say, {{New York City Subway}} and replace all the icons with text. (I did check the history and there is no mention of "accessibility" or "contrast" in any of the revisions.) I suppose I could be bold and see what happens, but without specific advice here on Wikipedia:Manual of Style/Accessibility I don't feel I have the concrete advice to back me up. I don't want to get into an edit war.
I suggest adding the following text to Wikipedia:Manual of Style/Accessibility:
Do not use logos or themed colors in place of default-color text links. They can keep people with low vision who don't use screen readers from being able to read the link, and can cause concentration issues for people with cognitive disabilities.
Thisisnotatest (talk) 23:36, 29 September 2024 (UTC)[reply]

Further, when non-white background colors are used, it can interfere with being able to see whether a link underline indicates the linked page does or does not exist. Actually, it can interfere with being able to see the link underline at all. Thisisnotatest (talk) 04:58, 1 October 2024 (UTC)[reply]

Also noticing templates where the title bar text is over a background gradient, where once of the background colors would properly take white text and the other one would properly take black text, making it impossible to choose an accessible text color that works with both. For example, {{MARTA Red and Gold lines}}, {{MARTA Blue and Green lines}}, and {{Richmond station (California)}}. Thisisnotatest (talk) 22:34, 4 October 2024 (UTC)[reply]

RfC partly concerning vision accessibility

[edit]

 You are invited to join the discussion at Wikipedia talk:Manual of Style/Linking § RfC: Linking of three-part place names. -- Tamzin[cetacean needed] (they|xe) 20:59, 17 October 2024 (UTC)[reply]

What to do about flashing images

[edit]

MOS:ANIMATION: In addition, animations must not produce more than three flashes in any one-second period. Content that flashes more than that limit is known to cause seizures.[14]

Let's say there's an animated image in several articles with rapid blinking, well exceeding 3 f/s. And, let's say it's effectively impossible to illustrate the thing it illustrates, w/out rapid blinking. Is the right thing to do, just remove the image then? Photosensitivity Warning: Thinking of File:Strobe 2.gif. Looking at that thing gives me a headache. --Slowking Man (talk) 21:56, 21 October 2024 (UTC)[reply]

Concerns with MOS:PSEUDOHEAD

[edit]

Going to say my piece here before being bold and seeing if others agree. The "acceptable" way of PSEUDOHEAD, shouldn't be an "acceptable" method. It's still pseudohead and is very manipulated by the community. Countless articles I have seen have dodged the use of headers by using bold markup instead which is pretty stupid, in my opinion. Maybe changing the language to make sure that people understand that it is ONLY to be used for when {{TOC limit}} can't be used. Right now, if I was an editor who never saw it. I'd see the acceptable way of using it and then just go ahead and use it, no questions. Or even get rid of the acceptable way and make it incorrect and tell people to suck it up. Cowboygilbert - (talk) ♥ 19:49, 31 October 2024 (UTC)[reply]

I would go further: if you're running into situations where you're struggling with {{TOC limit}}, there's almost certainly something wrong with how you're structuring the article. Even the heftiest prose articles rarely need level-4 headings and frankly should never use level-5 headings. I'm willing to go out on a limb and say the same is the case for list articles unless someone can show me a counterexample. Remsense ‥  19:53, 31 October 2024 (UTC)[reply]
I did see an issue with {{TOC limit}} is that you need to have nested-headers when doing lvl 4 or lvl 5. So it MUST follow a level 3 header.
So you can't do:
== Header ==
==== Small header====
so you have to do:
== Header ==
=== Small-ish header ===
==== Small header ====
Which could be fixed with fixing the TOC limit template code but I am not a template editor. Cowboygilbert - (talk) ♥ 19:57, 31 October 2024 (UTC)[reply]
I'm not quite understanding how this is an issue, unless it's that other editors would like to skip to smaller font sizes or more granular divisions. I would reiterate what I said above: it seems almost certain to me that if an editor finds themselves wanting this, they should consider whether they're doing something idiosyncratic or unnecessary. Remsense ‥  20:01, 31 October 2024 (UTC)[reply]
I saw it happen on Chromakopia while fixing it's PSEUDOHEAD. It has lvl 2 headers and then lvl 4 headers, but you can't limit lvl 3 because there are other sections that need to show on the TOC. (i did have to google idiosyncratic btw) But on articles where I mainly see it, which is in Category:Production discographies, they aren't an issue because it's usually a lvl 2 followed by a lvl 3 header. Cowboygilbert - (talk) ♥ 20:04, 31 October 2024 (UTC)[reply]
My point is that one should never have to skip levels: usually, the better solution is either to omit the granular lower-level headings as unnecessary, or be less dogmatic about the scope of higher-level headings (for example, sections that relate the narrative of a historical event shouldn't be stuffed under a top-level "History" section, like my least favorite LTA and many others feel the need to do). Remsense ‥  20:10, 31 October 2024 (UTC)[reply]
MOS:GOODHEAD is clear: Nest headings sequentially, starting with level 2 (==), then level 3 (===) and so on. (Level 1 is the auto-generated page title.) Do not skip parts of the sequence --Redrose64 🌹 (talk) 00:04, 1 November 2024 (UTC)[reply]
I suppose I would echo Gil's question here: what is the expected use case for pseudoheaders when formatted correctly? Remsense ‥  02:09, 1 November 2024 (UTC)[reply]