Using the menu with RTL or bi-directional text is mostly no different, but there are a few things to note, and some specific limitations to consider.
There are three significant things you need to do:
"rtl"
dir="rtl"
to your <html>
tag
document.dir
is not a reliable test).
You can have a dir
attribute on the
<body>
tag as well
- that won't make a difference -
but it MUST be there on
<html>
.
Now, if you have a
horizontal navbar and you're using
absolute positioning, you'll be vulnerable to a
positioning quirk in Internet Explorer and Opera, whereby the
right:0;
position is offset by the same amount as the document
margins, and that stops the navbar from sitting flush with the edge.
Therefore if you use that particular configuration
you should nullify the margins,
to avoid cross-browser discrepancies, like this:
html,body {
margin:0;
}
All configuration options are available except:
Some browsers which otherwise support the menu won't work with RTL text, for reasons external to the script - Mac/IE5, Opera 5, 6 and 7.0-7.1 either don't support non-Latin encoding, or don't support directionality. But that being the case, no users of these browsers will be looking at an RTL site, so we don't have to think about them at all.
Of the browsers that remain, some have feature limitations - either because I couldn't make them work, or they were unstable and had to be disabled. Specifically:
onmouseover
.
UDM 4 is valid XHTML, and in our judgement, meets the criteria for WAI Triple-A conformance.