WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Full vs partial URL in webpages, is there a rule for this?

for

From: Angela French
Date: Nov 7, 2011 4:09PM


I have always used relative hrefs in my coding, rather than absolute.

>-----Original Message-----
>From: <EMAIL REMOVED> [mailto:webaim-forum-
> <EMAIL REMOVED> ] On Behalf Of Birkir R. Gunnarsson
>Sent: Monday, November 07, 2011 2:05 PM
>To: WebAIM Discussion List
>Subject: [WebAIM] Full vs partial URL in webpages, is there a rule for this?
>
>Hi gang
>
>I came across an interesting problem today, that turned out not to really be
>an accessibility problem.
>A user reported that clicking on a link on an internal wbsite did not produce
>any results (no new page was loaded).
>A quick check on the html code confirmed that the problem appears to be
>that the href attribute of the anchor link only gives the internal folder url.
>(since the website is a closed one I am probably not allowed to provide th
>exact url).
>Think of it as
>a href="/subdirectory/document"
>rather than
>a href="http://mypage.com/subdirectory/documents"
>Actually, the specific page was coded in asp.net I believe and the references
>looked like
>
><a href="/?PageID=337"
>I confirmed this by cocatenating this part with the page address in the
>address bar, and this took me to the subpage of the site as expected.
>
>Since this is a website where users have to log in, it seems to be ok for the
>developers to assume that the url to the site itself is concatenated with the
>links in the href part .. but this is not the case.
>Isn't that an example of bad coding, shouldn't full urls always be included in
>links, or are there situations where this technique is acceptable, or even
>recommended?
>I know this is not exactly accessibility, but I had to address it as an
>accessibility problem, feel free to let me know if this is too off topic.
>Thanks
>-Birkir
>