Hi all, There's been some discussion over at Spinoffs [1] about making findFirstElement tabindex-aware.
Before going further, do note that although originally findFirstElement's underlying method, getElements, did not respect document order, it got fixed a while back [2] and now abides by it. Its current behavior is to return the first element in the form that has a form serializer in Prototype and is neither hidden nor disabled. There's been a lot of arguing about whether this is good enough (stuff about readonly elements and the like), but my focus here is about tabindex. Accessibility likes tabindex, as it lets the page developer specify the order in which elements (and not just form elements, either, but links, etc.) should get focus on keyboard navigation (i.e. the Tab key). Within a form, if at least one element features the tabindex attribute, the one with the lowest value should be regarded as the "first element," tabbing-wise. I propose a rather simple patch to findFirstElement that would take this into account: if at least one non-hidden (at the current level of testing, that is, not accounting for container visibility), enabled field has a tabindex, the one among those with the lowest value would be the "first element." If there is no "visible," enabled field with a tabindex, then the method would work as it does today. Before I go about finetuning this patch and submitting it, I'd like your opinion on whether this is such a good idea. I'm not interested in radically extending this functionality, or people explaining why this is not "good enough for them." I'm interested in whether this is relevant, even if not as feature-complete as you'd like. Small steps, people. Cheers, [1] http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/7ea2f71cd7f87853/5b5ec8186cf3f8af [2] http://dev.rubyonrails.org/changeset/5093 -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---