-
Notifications
You must be signed in to change notification settings - Fork 56
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
Question about accessibility concerns (u-mention) #947
Comments
hmm! sorry for the trouble. if i understand this right, the problem is that you're rendering bridgy's webmention source html directly on your site, verbatim - via webmention.io - and lighthouse is complaining about the links that don't have link text? generally the burden of rendering webmention content into good HTML falls on the receiving site, including sanitizing it, making it accessible, etc. afaik webmention.io does some sanitizing - aaronpk/webmention.io#13 - but probably not other modification for accessibility etc. for this example specifically, here's the source tweet: the "empty" links are both to the link in the quoted tweet, at a higher level, bridgy's source webmention HTML itself is primarily designed for computers, not people, so when it hits a tradeoff like this, it prioritizes compatibility with webmention receivers such that the resulting webmentions displayed on the receiving sites look right. so, i'm not sure i see a concrete change here i'd make. feel free to suggest something though! also cc @aaronpk. |
Is there some sort of aria attribute to tell browsers or screen readers that this link should not be navigated to? That'd be the simplest thing I could think of to fix it. I don't really have anything I can do on the receiving end for this either, except for maybe just straight up removing |
aww, that would be sad! the links and other formatting markup on the HTML are valuable and useful. don't throw them out just for an automated tool's complaint that's imho spurious anyway! |
I think the best thing here is for bridgy to include |
@snarfed I’ll think about some options before I go there. 😄 The original versions of the code I borrowed for this purpose had some HTML-sanitizing functionality but I decided — for reasons I don’t fully recall now — to avoid using it; perhaps I can reevaluate that. |
@aaronpk sure! will do. |
Lighthouse downrates "mention-of"-type webmentions beginning with
<a class="u-mention"
with the following message in the Accessibility category:I have mitigated similar problems with the webmention images with
aria-label=
HTML, but it appears the<a class="u-mention"
stuff — which, in my particular case, is rendered in${mention.content.html}
— is pre-injected with thecontent.html
item from the JSON supplied from brid.gy by webmention.io. So, is there a way to augment the receivedcontent.html
on the receiving end (other than altering the received JSON which, of course, would last only until the next time it's accessed)?The specific page where I saw this is https://brycewray.com/posts/2020/05/battle-ios-email-heavyweights/. The HTML that Lighthouse complained about is:
... and the original JSON returned is:
So I guess I'm wondering whether there's some API-related way to auto-add HTML that would mitigate automated tools' concerns about accessibility in this and other, similar cases. Thanks!
The text was updated successfully, but these errors were encountered: