The HTML5 spec (http://dev.w3.org/html5/spec/Overview.html#the-bdi-element) states that "For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER", i.e. as a neutral character. Thus, a <bdi> containing a <br> (which serves as a paragraph break in the content of the <bdi>) must *not* serve as a paragraph break in the content around the BDI (since a neutral character does not do so).
Unfortunately, currently, the content before and after a <bdi> containing a <br> is rendered as separate bidi paragraphs, and so directional runs and other bidi effects that would otherwise be formed between the two are severed.
Created attachment 119000 [details]
test case (ref file coming as separate attachment)
This is one of the tests being submitted to email@example.com for inclusion into the W3C's HTML5 test suite.
Created attachment 119001 [details]
ref file for the test case above
The CSS spec may be changed in this respect due to a recent proposal to add isolates to Unicode and to make the CSS feature make use of the new Unicode feature - which will require changes to the details of the CSS spec. Details at http://lists.w3.org/Archives/Public/public-i18n-bidi/2012AprJun/0022.html
The CSS spec has indeed been changed, and this behavior is now according to spec.