RE: Can I make a suggestion for permalinks within the W3C spec docs?

If you are using jQuery, you could do something like the following when the page loads.

$(function(){
var baseURL = document.URL.substring(0, document.URL.indexOf('#'));
$('css-selector-to-loop-through-all-permalinks').each(function(){
var lbl = $(this).attr('aria-label');
$(this).attr('aria-label', lbl + ': ' + this.href);
});
});

Then the script automatically adds the correct url and the markup stays the same?

From: ahby@aptest.com [mailto:ahby@aptest.com] On Behalf Of Shane McCarron
Sent: Thursday, April 09, 2015 2:56 PM
To: Bryan Garaventa
Cc: W3C WAI Protocols & Formats
Subject: Re: Can I make a suggestion for permalinks within the W3C spec docs?

Hmm.  I am not sure we can *know* the URL.  In that any HTML file may have fragment IDs, but the full URL is the basic URL of the document # the fragment ID.  Since the documents are static, there isn't a good way to put the full URL of the permalink into the aria-label.  If there were an href="fragmentID" that would of course be expanded automatically into the full URL, but I doubt that helps?

On Thu, Apr 9, 2015 at 4:51 PM, Bryan Garaventa <bryan.garaventa@ssbbartgroup.com<mailto:bryan.garaventa@ssbbartgroup.com>> wrote:
Thanks, this is the new markup

<a title="Permalink for co-evolution" aria-label="Permalink for co-evolution" href="#co-evolution" property="url"><span content="1.4 Co-Evolution of WAI-ARIA and Host Languages" property="title">§</span></a>

The name of the link is better than before, instead of it being “#”, it is now “Permalink for co-evolution”.

I would still suggest adding the url within the aria-label, simply to allow access to the address bar content for non-sighted screen reader users without having to jump around so much. This wouldn’t have any visual impact at all, and would improve accessibility.

From: ahby@aptest.com<mailto:ahby@aptest.com> [mailto:ahby@aptest.com<mailto:ahby@aptest.com>] On Behalf Of Shane McCarron
Sent: Thursday, April 09, 2015 2:40 PM
To: Bryan Garaventa
Cc: W3C WAI Protocols & Formats
Subject: Re: Can I make a suggestion for permalinks within the W3C spec docs?

Can  you examine the permalinks in the current draft?  These are quite different than what is in the last ARIA Recommendation.  I am just wondering if we are doing a better job now?

For example, this is one http://w3c.github.io/aria/aria/aria.html#intro_ria_accessibility


On Thu, Apr 9, 2015 at 4:17 PM, Bryan Garaventa <bryan.garaventa@ssbbartgroup.com<mailto:bryan.garaventa@ssbbartgroup.com>> wrote:
Hi,
I've been noticing for a while that the permalinks associated with each section are only conveyed as "#" in the virtual buffer when arrowing while using JAWS, and based on the markup this makes sense given what the naming calculation states.

E.G
http://www.w3.org/TR/wai-aria/roles#button


<a title="Permalink for button" href="roles#button">#</a>

Since I use these all the time when writing reports, I have to do all of the following steps just to get the correct url plus content:
1. Activate the link, causing the page to reload.
2. Jump to the address bar (Alt+D)
3. Copy the url then jump away (Alt+Tab) to paste it somewhere.
4. Jump back (Alt+Tab) where I am set back on the address bar.
5. Since I have lost my place in the doc, now I need to press Enter on the address bar again to reload the page and move back to the referenced section.
6. Navigate down into the content and copy the desired quote for copying and pasting elsewhere.

It would be helpful if the permalink was included within the accessible name for this link, so I wouldn't need to reload the page twice in my effort to copy all of the desired content.

As an example, I've included functionality such as this at
http://whatsock.com/training/#hd7

Which I just copied from the virtual buffer and pasted here.

Markup:

<a title="Permalink: http://whatsock.com/training/#hd7" class="permalink" aria-label="Permalink: http://whatsock.com/training/#hd7" href="http://whatsock.com/training/#hd7"><span aria-hidden="true">#</span></a>

Technically it doesn't need the aria-label, but I added this to jump the queue in the naming calculation, and aria-hidden prevents the # from hijacking the accessible name over title, which is what is happening for the W3C permalinks.

This wouldn't require wide scale editing, I just wrote a JavaScript function to do this automatically as a permalink generator, but the difference in time it takes me to use this type of information would be significantly improved by doing something like this within the specs.

Just a suggestion :)



--
Shane McCarron
Managing Director, Applied Testing and Technology, Inc.



--
Shane McCarron
Managing Director, Applied Testing and Technology, Inc.

Received on Thursday, 9 April 2015 22:35:51 UTC