[Hippo-cms7-user] Accessibility Xinha editor: LangMarks plugin (strict XHTML)

Jasper de Vries jasper.de.vries at ddnh.nl
Sat Sep 4 12:37:58 CEST 2010


Hi Frank,
 
I've added the language support to the trunk of the webrichtlijnen project. I
renamed the plugin to LangAttr to prevent confusion with the original LangMarks
plugin (since I'm planning to make more modifications to the plugin).
 
I noted that my HTML was stripped though. Markup for defining a language in
XHTML should done by adding both the lang and the xml:lang attribute. I modified
the cleaner service to:
 
<sv:node sv:name="hippohtmlcleaner:cleanupElement">
    <sv:property sv:name="jcr:primaryType" sv:type="Name">
        <sv:value>hippohtmlcleaner:cleanupElement</sv:value>
    </sv:property>
    <sv:property sv:name="hippohtmlcleaner:name" sv:type="String">
        <sv:value>span</sv:value>
    </sv:property>
    <sv:property sv:name="hippohtmlcleaner:attributes" sv:type="String">
        <sv:value>class</sv:value>
        <sv:value>id</sv:value>
        <sv:value>lang</sv:value>
        <sv:value>xml:lang</sv:value>
    </sv:property>
</sv:node>
 
But still my span with lang and xml:lang attribute get stripped. Did I overlook
something? Or can this be a bug in version 2.08.02 of the cms?
 
Regards,
Jasper
 

On July 15, 2010 at 11:20 AM Frank van Lankvelt <f.vanlankvelt at onehippo.com>
wrote:

> hi Jasper,
>
> that's great!  Thanks for the patch.
> Could you open a forge user account?  Then we can add you to the
> webrichtlijnen project and you can commit these enhancements yourself.
>
> thanks, Frank
>
> On Thu, Jul 15, 2010 at 10:32 AM, Jasper de Vries
> <jasper.de.vries at ddnh.nl> wrote:
> > For who's interested, here are the modified files (see step 2 in posting
> > below).
> >
> > Kind regards,
> > Jasper
> >
> > On 9-7-2010 11:02, Jasper de Vries wrote:
> >> Hi Arje, Jeroen and others,
> >>
> >> I noticed that the LangMarks plugin was not part of the webrichtlijnen
> >> editor. When you use text on your site which is in a different language
> >> then the main language (defined your html tag) you should set the lang
> >> (and xml:lang for XHTML) attribute to the corresponding language.
> >>
> >> http://www.webrichtlijnen.nl/english/manual/development/production/languages/in-markup/variations-in-pages/#r-pd-15-7
> >>
> >> I've added it yesterday to my project and made a few changes:
> >>
> >> 1. In
> >> /hippo:configuration/hippo:frontend/cms/cms-services/htmlCleanerService/cle
> >> aner.config/hippohtmlcleaner:cleanup/hippohtmlcleaner:cleanupElement
> >>
> >> I've added hippohtmlcleaner:attributes "lang" and "xml:lang".
> >>
> >> 2. Copied LangMark files from my target directory to the src:
> >> /cms/src/main/webapp/xinha/xinha/plugins/LangMarks/LangMarks.js
> >> /cms/src/main/webapp/xinha/xinha/plugins/LangMarks/lang-marks.css
> >>
> >> 3. Made changes to the Javascript to add the "xml:lang" attribute and
> >> remove the "haslang" class. Arje, I can e-mail the files to your Hippo
> >> e-mail address if you like. I'm not sure if I can use (small)
> >> attachments on this mailing list.
> >>
> >> 4. In
> >> /hippo:namespaces/hippostd/html/editor:templates/_default_/root
> >>
> >> I've added "langmarks" to the Xinha.config.toolbar
> >>
> >> I'm not that happy with the LangMarks plugin and I consider the changes
> >> I've made as quick fixes. If I can find some time on this project I
> >> would like to do some more changes on this plugin. The thing that annoys
> >> me the most is the fact that you can only create translated spans (so
> >> inline texts).
> >>
> >> Kind regards,
> >> Jasper
> >
> > _______________________________________________
> > Hippo-cms7-user mailing list and forums
> > http://www.onehippo.org/cms7/support/forums.html
> >
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onehippo.org/pipermail/hippo-cms7-user/attachments/20100904/1b87ff90/attachment.htm>


More information about the Hippo-cms7-user mailing list