WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: declare the language in spans for Hebrew - left to right? Right to left?

for

Number of posts in this thread: 5 (In chronological order)

From: Sandy Feldman
Date: Wed, Jun 16 2021 9:10AM
Subject: declare the language in spans for Hebrew - left to right? Right to left?
No previous message | Next message →

hey all,

I am working on a web page that includes Hebrew phrases. I want to
declare the language in spans, but since the language goes right to left
does the span start on the left or the right?

Residence  / </span>כתובת<span lang="he">

or

Residence  / <span lang="he">כתובת</span>

thanks so much!

--
Sandy
sandyfeldman.com

From: Amanda Rush
Date: Wed, Jun 16 2021 9:59AM
Subject: Re: declare the language in spans for Hebrew - left to right? Right to left?
← Previous message | Next message →

Hi Sandy,

Your span tag would be left to right, and you'll want a bit of CSS to ensure
that the text displays correctly in browsers/systems whose default is not
set to Hebrew or some other right-to-left language.

Also, if this is a wordPress page//site, and you have the affordance, quit
now on this part. wordPress does poorly in multilingual situations, and it's
even worse when one language is Latin characters and the other is non-Latin.
If the site is multilingual and wordPress, you'd be better off having
someone like Motionpoint handle the foreign language with a separate site
which they then sync to the original. This introduces its own set of
complications, but if you're dealing with WordPress it'll be less of a
hair-pulling experience than trying to fight that and hack around with cSS
to get Hebrew working correctly.

Speaking from experience on this. Not recommending Motionpoint because I
like working with them or because they pay me, just have had to deal with
them on a site with several languages involved. They will do accessibility
but you'll have to be specific, very specific, and it will likely require
several arguments with their engineers which will be passed through their
client rep.

Hope this is helpful.

Amanda

From: glen walker
Date: Wed, Jun 16 2021 10:00AM
Subject: Re: declare the language in spans for Hebrew - left to right? Right to left?
← Previous message | Next message →

You are not coding in an RTL language. You are coding in HTML, which is
LTR, so the <span> will not change. Open <span> tag first, then the
contents, then the close </span> tag.

It's the contents in the <span> that is RTL. You will probably want to set
the DIR attribute to "RTL" on the contents.

https://www.w3.org/TR/html53/dom.html#the-dir-attribute

I'm not sure RTL will work on inline elements. I know it works on block
level elements so you might need a <div> instead of a <span>


On Wed, Jun 16, 2021 at 9:11 AM Sandy Feldman < = EMAIL ADDRESS REMOVED = >
wrote:

> hey all,
>
> I am working on a web page that includes Hebrew phrases. I want to
> declare the language in spans, but since the language goes right to left
> does the span start on the left or the right?
>
> Residence / </span>כתובת<span lang="he">
>
> or
>
> Residence / <span lang="he">כתובת</span>
>
> thanks so much!
>
> --
> Sandy
> sandyfeldman.com
>
> > > > >

From: Sandy Feldman
Date: Wed, Jun 16 2021 10:45AM
Subject: Re: declare the language in spans for Hebrew - left to right? Right to left?
← Previous message | Next message →

Hey all,

<span lang="he" dir="rtl">ליד פסנתר: אהרן לזר</span>
At the piano: Aharon Lazar

so - this looks good ... wondering how it sounds!

thanks again,

Sandy


On 2021-06-16 12:00 p.m., glen walker wrote:
> You are not coding in an RTL language. You are coding in HTML, which is
> LTR, so the <span> will not change. Open <span> tag first, then the
> contents, then the close </span> tag.
>
> It's the contents in the <span> that is RTL. You will probably want to set
> the DIR attribute to "RTL" on the contents.
>
> https://www.w3.org/TR/html53/dom.html#the-dir-attribute
>
> I'm not sure RTL will work on inline elements. I know it works on block
> level elements so you might need a <div> instead of a <span>
>
>
> On Wed, Jun 16, 2021 at 9:11 AM Sandy Feldman < = EMAIL ADDRESS REMOVED = >
> wrote:
>
>> hey all,
>>
>> I am working on a web page that includes Hebrew phrases. I want to
>> declare the language in spans, but since the language goes right to left
>> does the span start on the left or the right?
>>
>> Residence / </span>כתובת<span lang="he">
>>
>> or
>>
>> Residence / <span lang="he">כתובת</span>
>>
>> thanks so much!
>>
>> --
>> Sandy
>> sandyfeldman.com
>>
>> >> >> >> >>
> > > > --
Sandy
sandyfeldman.com

From: Amanda Rush
Date: Wed, Jun 16 2021 10:51AM
Subject: Re: declare the language in spans for Hebrew - left to right? Right to left?
← Previous message | No next message

Hebrew support for screen readers is IMHO not nearly as good as
English/western language support. I can switch synths and give this a try
though. VO does OK for vO.

Amanda