WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Should URLs be in camel case like hash tags?

for

From: Jeremy Echols
Date: Nov 30, 2022 9:08AM


Probably also worth noting that if you're expecting users to manually enter URLs regularly, you don't want the path (the bit after the domain and first slash) longer than a single word anyway. And even then it would be a poor design choice. The only time I could think of asking users to type in a URL manually would be in a TV or radio ad, and again in those cases you want something very short and simple.

Power users may hack up URLs, but your everyday user should be able to get where they want without typing in a long URL.

Regarding the original question, my gut -- not any information I have, mind, but just my gut -- tells me the URL itself doesn't matter for accessibility purposes. For readability I personally prefer hyphenation between words in a URL path, but hopefully your links are only rarely being seen "raw". And if you do need to share URLs this way, I suspect the same thing applies that I mentioned above, where you want a short URL whenever possible, even if it's just a redirect to something longer.

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Steve Green
Sent: Wednesday, November 30, 2022 06:58
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Should URLs be in camel case like hash tags?

While it is correct that Unix and Linux webservers are case sensitive, in more than 20 years of website testing I don't ever recall seeing a 404 due to incorrect capitalisation of URLs. I did see one instance where different capitalisation resulted in entirely different page content.

Windows webservers are not case sensitive.

Steve Green
Managing Director
Test Partners Ltd


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Rowan @ Jetboy
Sent: 30 November 2022 14:47
To: <EMAIL REMOVED>
Subject: Re: [WebAIM] Should URLs be in camel case like hash tags?

Most web servers are case sensitive, so:

https://urldefense.com/v3/__https://mywebsite.com/pageInCamelCase/__;!!C5qS4YX3!BjJHKjYY7Fpa54a3QWIdPI6Oc7iwcyjL520keSb1t34HvXXr7r5OH_iUkG0f_LKOM2-kjEh-dkkJOtdW3Zi3zDThLThk4w$

https://urldefense.com/v3/__https://mywebsite.com/pageincamelcase/__;!!C5qS4YX3!BjJHKjYY7Fpa54a3QWIdPI6Oc7iwcyjL520keSb1t34HvXXr7r5OH_iUkG0f_LKOM2-kjEh-dkkJOtdW3Zi3zDT1v78IAw$

would effectively be two distinct URLs. The first would return the page the user wanted. The second would 404. So any advantage in legibility would be offset by the requirement to get the capitalization right, for both the user and your developers. You could setup redirect rules, or allow duplicate pages to be served, but I'd advise not creating the problem in the first place and sticking with all lowercase, separated by hyphens (as Daniel advises).

On 30/11/2022 11:27, Barry via WebAIM-Forum wrote:
> I know the best practice with hash tags, but cannot find anything
> useful on whether or not to camel case URLs for a11y.
>
>
>
> Incidentally, is there a WCAG to support camel case hash tags?
>
>
>
> Thanks in anticipation.
>
>
>
> Cheers
>
>
>
> Barry
>
> > > https://urldefense.com/v3/__http://list.webaim.org/__;!!C5qS4YX3!BjJHK
> jYY7Fpa54a3QWIdPI6Oc7iwcyjL520keSb1t34HvXXr7r5OH_iUkG0f_LKOM2-kjEh-dkk
> JOtdW3Zi3zDS__-6zEw$ List archives at
> https://urldefense.com/v3/__http://webaim.org/discussion/archives__;!!
> C5qS4YX3!BjJHKjYY7Fpa54a3QWIdPI6Oc7iwcyjL520keSb1t34HvXXr7r5OH_iUkG0f_
> LKOM2-kjEh-dkkJOtdW3Zi3zDSoou2Ybw$
>