Results 1 to 2 of 2

Thread: <a> tags without role="button" specified

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-9801 in a recent build.
  1. #1
    Sencha User
    Join Date
    Mar 2009
    Location
    Fort Worth, TX
    Posts
    65
    Vote Rating
    -35
      0  

    Default <a> tags without role="button" specified

    Shouldn't *all* <a> tags in ExtJS also have role="button" specified? Per my analysis about half do and half don't.

    In particular I'm interested in this being added for menu items. In Ext 4.2 Ext.menu.Item's renderTpl is specified (in part) as follows (lines 120519-29), and as you can see, unlike other <a> tags where role="button" is specified, it is not in the following instance:

    Code:
                '<a id="{id}-itemEl"',
                    ' class="' + Ext.baseCSSPrefix + 'menu-item-link{childElCls}"',
                    ' href="{href}"',
                    '<tpl if="hrefTarget"> target="{hrefTarget}"</tpl>',
                    ' hidefocus="true"',
                    
                    ' unselectable="on"',
                    '<tpl if="tabIndex">',
                        ' tabIndex="{tabIndex}"',
                    '</tpl>',
                '>',
    My interest is being able to hone in on elements where role="button" for automated Selenium testing, which if you think about it goes hand in hand with accessibility. In any event, shouldn't role="button" be added consistently?

    Here are the results of me grepping the source code if this helps hone in on where <a> tags are specified, and whether they may or may not have role="button" specified:

    $ cat ./ext-all-debug.js | egrep -n '<a |role="button"'
    44951: '<a id="{id}-btnEl" class="{baseCls}-button" role="button" hidefocus="on" unselectable="on"',
    44981: '<a id="{id}-closeEl" class="{baseCls}-close-btn" title="{closeText}" href="#"></a>',
    94344: '<div class="' + Ext.baseCSSPrefix + 'trigger-index-0 ' + Ext.baseCSSPrefix + 'form-trigger ' + Ext.baseCSSPrefix + 'form-spinner-up {spinnerUpCls} {childElCls}" role="button"></div>' +
    94345: '<div class="' + Ext.baseCSSPrefix + 'trigger-index-1 ' + Ext.baseCSSPrefix + 'form-trigger ' + Ext.baseCSSPrefix + 'form-spinner-down {spinnerDownCls} {childElCls}" role="button"></div>' +
    96555: '<a style="{parent.monthStyle}" hidefocus="on" class="{parent.baseCls}-item-inner" href="#">{.}</a>',
    96563: '<a id="{id}-prevEl" class="{baseCls}-yearnav-button {baseCls}-yearnav-prev" href="#" hidefocus="on" ></a>',
    96567: '<a id="{id}-nextEl" class="{baseCls}-yearnav-button {baseCls}-yearnav-next" href="#" hidefocus="on" ></a>',
    96573: '<a hidefocus="on" class="{parent.baseCls}-item-inner" href="#">{.}</a>',
    96981: '<a id="{id}-prevEl" class="{baseCls}-prev {baseCls}-arrow" href="#" role="button" title="{prevText}" hidefocus="on" ></a>',
    96984: '<a id="{id}-nextEl" class="{baseCls}-next {baseCls}-arrow" href="#" role="button" title="{nextText}" hidefocus="on" ></a>',
    96999: '<a role="presentation" hidefocus="on" class="{parent.baseCls}-date" href="#"></a>',
    98231: '<a id="{id}-btnEl" class="{baseCls}-button" role="button" hidefocus="on" unselectable="on"',
    98537: '<a href="#" class="color-{.} {parent.itemCls}" hidefocus="on">',
    120519: '<a id="{id}-itemEl"',
    120946: '<a id="{id}-itemEl" class="' + Ext.baseCSSPrefix + 'menu-item-link{childElCls}" href="{href}" <tpl if="hrefTarget">target="{hrefTarget}"</tpl> hidefocus="true" unselectable="on"',
    125026: buf.push('<a class="' + Ext.baseCSSPrefix + 'tree-node-text" href="', href, '" target="', target, '">');

    Thanks in advance for your attention to this matter

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,154
    Vote Rating
    249
      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •