Re: I18N-ISSUE-159: Extend output or create a new element for injected text [.prep-HTML5]

> Date: Mon, 30 Apr 2012 16:20:17 +0300
> From: Aharon (Vladimir) Lanin <aharon@google.com>
>
...

> So, my preference would be a new element. However, this would
> immediately raise the question of whether <bdi> should be kept in the
> spec - or completely replaced with the new element. In other words,
> should <bdi> be renamed and re-branded? If it should not be renamed, we
> need a cogent reason why we need two (or three, counting <output>) such
> elements. If it should be renamed, we have the potential problem of
> <bdi> already being in the public spec and even in at least one printed
> book...
>
> Whether <output> is broadened or a new element created, I think there
> will also be a problem with stating, reasonably clearly, the purpose of
> the element without referring to bidi considerations as being the
> principal defining characteristic. But if someone can think of a
> reasonable description that has a chance of bidi-unaware people actually
> starting to use it, that would be great.
>


I don't think it's a good idea to replace bdi now for two reasons:

1. it is already being implemented and explained to people (as you 
mentioned)

2. bdi is still needed for use cases involving non-injected text - ie. 
where you know the direction of the text but want to manage the 
bidirectionality. In these cases, the use of an element called output or 
<injected-text> (or whatever) is not really appropriate there.

I was thinking along the lines of: "The output element represents the 
result of a calculation or other text that is inserted at run time into 
the web page."

I agree that the rationale for using the element needs to stand alone, 
although we should mention in a note or separate paragraph that it has 
significant benefits if the page is likely to contain or be translated 
into a language that uses a right-to-left script.

In some ways I could see it making sense to people to use an output 
element as a placeholder for text that is inserted by JavaScript (such 
as a table of contents). It may be harder to make the case for text that 
is inserted using PHP.  Having said that, if they don't use the element 
they need to use bdi, and I suspect that that is harder for people to grasp.

I suspect that it may be easier to convince people to use output than to 
use a completely new element which is only useful for injected text.

RI

Received on Tuesday, 1 May 2012 15:18:39 UTC