The post Advice for meeting someone who is blind appeared first on Learning A11y.
]]>Another thing you may encounter when meeting someone who is blind is their guide dog. A service animal is much different than a pet, and there are some additional tips I’ve gather for that.
I’ve known a few kids who think every dog is there for them to pet them. Guide dog aside, it’s important to teach children to ask before petting another person’s dog. But especially for guide dogs, it’s important to explain to your child that guide dogs are not pets, but are working animals that help people with disabilities. Teach them that it’s important to be respectful of the dog’s job and not to pet or distract them while they’re working. Encourage them to ask questions and learn more about guide dogs and their important role in society.
I hope that helps someone before they meet a blind person for the first time. Again, I wish I had been aware of those items – I would’ve felt a little less ignorant.
I’m still learning, and I welcome feedback. If you have any thoughts, questions, comments, or corrections, email me or leave a comment via Mastodon.
The post Advice for meeting someone who is blind appeared first on Learning A11y.
]]>The post How to fix “Links must have discernible text” appeared first on Learning A11y.
]]>What does ‘discernible text’ even mean?
It means that a screen reader, or even a search crawler, can’t see any text here. I often see this on pages that use logos for links to social media.
For example: here is some basic HTML showing a link to a twitter account:
<a href="https://twitter.com/walmart">
Follow us on Twitter
</a>
In the above example, a machine can read over that HTML and determine “this is a link”, as well as determine where the link is going, and also what the link says.
But what if someone chooses to use an image of a Twitter logo instead of the text above:
<a href="https://twitter.com/walmart">
<img src="twitter-logo.png" />
</a>
In the above HTML, a machine can read of that HTML and determine “this is a link”, as well as determine where the links is going, but there is no text of what this link is supposed to say. There is no discernible text. It might as well look like this:
<a href="https://twitter.com/walmart"></a>
Just blank!
One way to fix this, when using an img
tag especially, is to include an alt
attribute:
<a href="https://twitter.com/walmart">
<img src="twitter-logo.png" alt="Follow us on Twitter" />
</a>
With above example, while a machine scanning this code may not be able to tell what the twitter-logo.png looks like, it can see the alt
value! So adding an alt
attribute with an appropriate value could be one way to resolve this issue.
Many sites use a font logo system, like Font Awesome, to display social links:
<a href="https://twitter.com/walmart">
<i class="fa-brands fa-twitter"></i>
</a>
In this instance, there is no img
tag above, therefore the alt
attribute doesn’t apply. What can one do here? One method is to use aria-label
, like so:
<a href="https://twitter.com/walmart" aria-label="Follow us on Twitter">
<i class="fa-brands fa-twitter"></i>
</a>
In the above example, an aria-label
attribute is added to the link, and machine screen readers know how to interpret that value.
While not suggested, another alternative is the use of the title
attribute instead of aria-label
:
<a href="https://twitter.com/walmart" title="Follow us on Twitter">
<i class="fa-brands fa-twitter"></i>
</a>
Use of title
is also picked up by screen readers. Not only that, people who use a mouse can mouse over this link, and a common browser behavior is to display the title
text as a tooltip after half a second of mouse hover.
title
?While this makes the “Links must have discernible text” message go away, it’s not a recommended practice. Historically, some browsers have latched onto the tooltip hover effect of title. The problem is that not all browsers implemented this consistently, nor do screen readers have a consistent way of supporting access to the title attribute. Additionally, the tooltip cannot work on mobile/touchscreens, and therefore authors should likely avoid this because of the inconsistency it provides to end users.
So while it gets rid of that message, it doesn’t necessarily make my site more usable.
Another tool, other than applying attributes to the link, is to insert text and styling it in a way that it doesn’t show up to sighted users, but it still accessible by screen readers. Take the example below:
<a href="https://twitter.com/walmart">
<i class="fa-brands fa-twitter"></i>
<span class="sr-only">Follow us on Twitter"</span>
</a>
Note the span
with the class of sr-only
– by itself this class doesn’t do anything special. If you don’t add any styles associate with that class name, then the text ‘Follow us on Twitter’ will just show up. But if you include the following snippet in your stylesheet, it will disappear from sight, while still being available to screen readers:
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
white-space: nowrap;
border-width: 0;
}
Does that look more complicated than display:none
? Why not use display: none
? The answer is that screen readers will also ignore text that is styled to display: none
, so best to avoid it if you want screen readers to pick up on the text.
Another method that is worth mentioning is to just show the text to all users – not hide it. Not everyone has memorized what these logos represent. Maybe having text alongside the logo available for everyone to see will make the area more usable. The less a user has to think about what an action will do, the more usable a site will feel.
<a href="https://twitter.com/walmart">
<i class="fa-brands fa-twitter"></i>
Follow us on Twitter
</a>
So running scans again after the above adjustments should address the ‘Links must have discernible text’ – at least for those instances.
I hope that helps give some insight into how to solve for “Links must have discernible text”. The above techniques are what I’ve used, and the common areas where I’ve seen this sort of thing.
The Mastodon post for this article is a good place for thoughts, questions, comments, or corrections. I’m still learning, and I welcome feedback.
Updated 2023-02-09: Incorporating feedback from Dan Keck .
The post How to fix “Links must have discernible text” appeared first on Learning A11y.
]]>The post What’s the easiest way to check my website for accessibility problems? appeared first on Learning A11y.
]]>The axe DevTools browser extension is powerful but not complicated. It’s a tool you can add to your desktop browser for free. Whenever you want, you can tell it to scan the page you’re browsing for accessibility issues. It then shows you a list of issues to address. I think it’s helpful to be walked through it once to get oriented, but from there it’s smooth sailing.
Anyone can install and run the axe DevTools browser extension. Web designers can and should install it. Quality engineers can and should install it. Web developers can and should install it.
You can run the axe DevTools extension on any web page that you are browsing. Does the site require a login? That’s easy – as a user, just log in and the run axe DevTools scan again. Do you have different views and layouts based on a responsive layout? No problem – change your screen size, and run the axe DevTools scan again. The scan runs against whatever is in your browser.
The extension is free. There’s some other pro-related stuff you can use, but I don’t know enough about it to talk about it. I’ve just always used the free extension part. It also seems to be part of a suite of tools for doing automated testing, and running things against an entire site – I don’t know much about those extras. (That’s when it really seems to get into ‘this-part-is-for-developers’ territory.) I make hobbyist websites and the free axe DevTools browser extension is more than enough for my needs.
No. I have no affiliation to Deque (the maker of this extension) – I just use and like the free version of the tool.
I use Chrome on a MacBook, and I’m writing this from that perspective. I think the same applies to using Edge as well, and I don’t think it matters whether you’re on Windows or Mac. If any of this can be done on Safari, I’d be surprised. Also, I don’t know if it can work on Android or iOS at all.
In Chrome, do a Google search for ‘axe Devtools chrome extension’. Alternatively, here is a link to axe Devtools chrome extension.
On the chrome extension page, click the ‘Add to Chrome’ button.
Chrome will then do the equivalent of asking ‘Are you sure you want to install this’ – go ahead and add the extension.
After doing so, Chrome may route you directly to a page built by Deque (the company that makes axe) showing how to use it. You can read that but you don’t have to leave it open.
Now that you have the extension, pretty much on any part of a web page, you can right-click and choose ‘inspect’.
After left-clicking ‘Inspect’, the Chrome dev tools panel will appear.
DevTools can be positioned in a variety of locations – on the bottom of the browser window, or on the side, or even in its own window. The screenshots here assume it’s on the bottom. To get more familiar with how to position the Chrome DevTools menu, the reader will need to look elsewhere.
In the screenshot below, you can see that ‘axe DevTools’ is one of the menu items now in Chrome’s DevTools. It may be behind an arrow if there are too many options to show at once.
Select ‘axe DevTools’.
I think the first time you install, it may ask you to agree to the terms. It also asks what kind of role you have – I just say ‘Developer’
Once done, you’ll see the axe DevTools interface. This can look different depending on the size of the browser. My screenshots henceforth will assume a fairly wide window, as if using most of a 15″ laptop window.
I think the interface is a little overwhelming if you’re not in it day-to-day. The interface has changed over the years, and will likely continue to do so, so if what you see is different from what’s in this screenshot, that wouldn’t surprise me. To get started, I recommend just finding and clicking the option that says ‘Scan ALL of my page.”
I’ve gone to the Memphis Zoo website’s membership page and ran the scan. It came back with the following:
The red numbers in the screenshot above correspond to the following numbers in the list:
The issues found are sometimes about content that is missing, or HTML issues, or even styling issues. After fixing the issues – re-run your scan. Are there zero issues now? Great!
axe DevTools is a fantastic tool, but it has its limitations. It scans the DOM tree, but it didn’t try to actually use your site like a human would. Also, it cannot identify things that are more subjective in nature (like if the language used is clear). That said, I find it essential, as it’s a great tool to use regularly for those first-pass issues and low-hanging fruit of things to address.
Fixing issues reported by axe DevTools made me a better front-end developer, as in many cases, the axe DevTools report will check for valid HTML and best practices. I think it could help others, too. It will also helped site’s search engine optimization, as generally things that are good for assistive technologies are also good for automated crawlers. Fixing issues caught by axe DevTools means that you will likely also address issues picked up by other automated scan tools. (And many times that’s enough to avoid drive-by accessibility lawsuits that are just based on blanket scans.)
I’ve made using axe DevTools part of my regular design and development routine.
The post What’s the easiest way to check my website for accessibility problems? appeared first on Learning A11y.
]]>The post How do blind people tell the difference between a 1 dollar bill and 5 dollar bill? appeared first on Learning A11y.
]]>Here are a few ways:
Like everyone else in the U.S., they also just use credit cards or their phone to conduct electronic payments.
In some other countries, bills are available at other sizes, and/or there are tactile marks embedded in the currency to help distinguish the bills from each other.
The post How do blind people tell the difference between a 1 dollar bill and 5 dollar bill? appeared first on Learning A11y.
]]>The post How do I make my Microsoft Teams meetings accessible and inclusive to those with disabilities? appeared first on Learning A11y.
]]>With the tips above, this will help make meetings more accessible to all. Do you have additional tips for making virtual meetings accessible? If so, please send them over!
The post How do I make my Microsoft Teams meetings accessible and inclusive to those with disabilities? appeared first on Learning A11y.
]]>The post Do CSS focus and hover styles need to match? appeared first on Learning A11y.
]]>That said, form the habit to consider :focus
at the same time as considering :hover
. In many cases, it makes perfect sense to apply the same styles.
Here’s a typical example:
button {
background: blue;
}
button:hover {
background: black;
}
In the above CSS, we have specified a :hover
state for the button. But what about :focus
? Do we need to also do this?
button {
background: blue;
}
button:hover, button:focus {
background: black;
}
In the above instance, if a keyboard user is tabbing through page elements, the button turns black when focus is set, just like when hovering over the button. This would be in addition to whatever the operating system and browser applies to focused buttons on web pages (often times an outline of some sort).
Mouse users get value from hover styles, like a background color of a button making a noticeable change. By default, many browsers change the mouse cursor when hovering over an interactive element.
Keyboard-only users also need to identify the currently-focused element. To my knowledge, all browsers use custom outline for the focused element, which ideally satisfies the need for someone to identify what has focus.
That said, it doesn’t hurt, and could be valuable, to duplicate the :hover
styles to the :focus
selector as well. But do not remove the outline on a :focus
style – that can stay as well, and likely should to provide some consistency for keyboard users or those with assistive technologies.
I’m open to discussion via email or Mastodon.
The post Do CSS focus and hover styles need to match? appeared first on Learning A11y.
]]>