Opened 9 years ago

Last modified 9 years ago

#12520 confirmed Bug

Language plugin: frustrating <span> expansion

Reported by: Wim Leers Owned by:
Priority: Normal Milestone:
Component: General Version: 4.4.5
Keywords: Drupal Cc: wim.leers@…

Description

Over at https://www.drupal.org/node/1993928, we're working on shipping the Language plugin with Drupal 8 core. It will not be enabled by default, but it will be 'available' by default, hence making it simple to meet WCAG2, which is required by many governments.

It's working well in general, except… that the way it handles <span>s is extremely frustrating.

If you write

<p><span dir="ltr" lang="nl">Hallo, wereld!</span></p>

and you have your cursor at the end of that line and press enter (to start a new paragraph) and type something, you'll get:

<p><span dir="ltr" lang="nl">Hallo, wereld!</span></p>
<p><span dir="ltr" lang="nl">foo</span></p>

Where you'd really expect the language span to not be applied to this new paragraph.

Change History (4)

comment:1 Changed 9 years ago by Hanno Lans

This plugin should handle language attributes within a sentence inline with span, but in that case not touch the text in the next block. If text is selected on block level however, other behavior is expected. I will file a new ticket for that.

comment:2 Changed 9 years ago by Mike Gifford

Would like to see this in a future release. Important for WCAG & ATAG goals.

comment:3 Changed 9 years ago by Frederico Caldeira Knabben

I agree that this behavior should be like you expected, considering that we're using inline elements.

The proposal at #12521 looks good, when it comes to applying the language information to block elements instead.

comment:4 Changed 9 years ago by Frederico Caldeira Knabben

Status: newconfirmed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy