[kupu-dev] Kupu buttons and drawers tabindex
Diego Municio
dmunicio at gmail.com
Wed Feb 28 13:58:43 CET 2007
First, thanks for the reply.
My problem is that I would like to insert an image in kupu by only using the
keyboard (for blind users) but I can't.
I don't know if this is a desired feature for Kupu or not but I believe that
this default behaviour is not very "Accessibility Compliant"...
In kupu 1.4, buttons tabindex are rendered as "-1" so buttons are not
getting focused with 'tab' key, so if I have understood it would be nice not
to have any "tabindex". That's no problem, I could remove them by modifying
kupu_wysiwyg_support .
Also in librarydrawer, I couldn't access the "Home", "Recent items" icons so
I made this change in drawer.xsl
(changed the 'div' to 'a' and added onkeypress event)
<xsl:template match="library">
<div onclick="drawertool.current_drawer.selectLibrary('{@id}');"
class="kupu-libsource" title="{title}" style="">
<xsl:attribute name="id">
<xsl:value-of select="@id"/>
</xsl:attribute>
----> <a onkeypress="if (event.keyCode != 9 )
drawertool.current_drawer.selectLibrary('{@id}');">
<xsl:apply-templates select="icon"/>
----> </a>
<span class="drawer-item-title">
<xsl:value-of select="title"/>
</span>
</div>
</xsl:template>
I could say the same with the "collection|resources" xsl:template in
drawer.xsl. I couldn't select the folders which appear in the center of the
drawer... so I added this xsl:attribute:
<xsl:attribute name="onkeypress">
<xsl:choose>
<xsl:when
test="local-name()='collection'">if (
event.keyCode != 9) drawertool.current_drawer.selectCollection('<xsl:value-of
select="@id"/>');</xsl:when>
<xsl:otherwise>if (event.keyCode != 9)
drawertool.current_drawer.selectItem('<xsl:value-of
select="@id"/>')</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
What do you think about that?
Any comments are welcome
2007/2/28, Duncan Booth <duncan.booth at suttoncourtenay.org.uk>:
>
> "Diego Municio" <dmunicio at gmail.com> wrote:
>
> > I have seen that kupu 1.4 doesn't have tabindex...
>
> Can you explain why an explicit tabindex would help you? A control which
> has no explicit tabindex comes next in the order it appears in the html.
> A control which uses tabindex/next also comes next in the tabbing order.
> The only time you should see a change is when the tab index is set to
> something which isn't tabindex/next, e.g. when it gets set to 30000 for
> the search controls in the page header.
>
> The problem is that unless you know a lot about the tabindex values used
> for the other controls around you it is almost impossible to come up
> with suitable values for tabindex.
>
> >
> > Well I now that in earlier versions it had a tal:attributes="tabindex
> > tabindex" statement for each button.
> > I wonder how can we access tabindex *object* defined in main_template,
> > in order to set tal:attributes="tabindex tabindex/next|nothing"
> > instead. I can access tabindex but I don't know why... Where is this
> > variable acquisition defined?
> >
> > I also know that global_defines defines a global tabindex variable but
> > with pos=30000.. I couldn't find documentation about
> >
> > The problem with drawers is maybe harder. As far as I know,
> > librarydrawer renders its contents with a xslt transform, and in
> > drawer.xsl I cannot add tal sentences... such as
> > tal:atrributes="tabindex tabindex/next".
>
> Well you could except that it is rendered as a separate template so
> unless you know a magic number to start from you would only succeed in
> making the drawer controls appear somewhere suprising.
>
> >
> > Has anybody work on this? I need to improve kupu accessibility as much
> > as possible and I would like to contribute if my knowledge is enough..
> >
> If you could start by explaining why the default tabbing isn't a good
> enough solution and what you would want to achieve by changing it.
>
>
> _______________________________________________
> kupu-dev mailing list
> kupu-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/kupu-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/kupu-dev/attachments/20070228/8e476a89/attachment-0001.htm
More information about the kupu-dev
mailing list