17 Replies Latest reply on Sep 23, 2008 8:49 AM by Newsgroup_User

    SPRY - W3C Friendly?

    jon@cmiwebstudio Level 3
      tabindex="0".... this is not valid code to pass W3C standards. Do other developers just omit this or is there a workaround?
        • 1. Re: SPRY - W3C Friendly?
          Ben M Adobe Community Professional
          They have noted that some features are not W3C compliant. There is a bunch of articles over in the labs as well because I use the sort feature and spry:sort is not valid XHTML either. But there are workarounds.

          I believe you are talking about the tabbed panel because I think that is the only one that uses the tab index. I'll take a look and get back. You may also want to post this in the Spry forums to see if Adobe already has a workaround:

          http://www.adobe.com/go/labs_spry_pr1_forum
          • 2. Re: SPRY - W3C Friendly?
            jon@cmiwebstudio Level 3
            sorry, forgot to mention that... it's the tabbed panel. I just omitted that part of the code since I don't think using the keyboard is that important, plus as it's coded, it doesn't work in all browsers anyway. I'll check out the labs part of the site and the other forums. Thanks for the info!
            • 3. Re: SPRY - W3C Friendly?
              Level 7
              "jon@cmiwebstudio" <webforumsuser@macromedia.com> wrote in message
              news:gb10ev$ajk$1@forums.macromedia.com...
              > tabindex="0".... this is not valid code to pass W3C standards. Do other
              > developers just omit this or is there a workaround?

              It's ok to use it as it helps keyboard navigation.
              Validation should be seen as a tool rather than a goal.


              --
              Thierry
              http://www.TJKDesign.com/go/?0 | Articles and Tutorials


              http://divahtml.com/products/scripts_dreamweaver_extensions.php | Extensions
              that keep your markup clean
              http://www.fourlevel.com/ | CSS Menus, Gallery, Tab Panels, etc
              --


              • 4. Re: SPRY - W3C Friendly?
                jon@cmiwebstudio Level 3
                I will not build websites for clients that don't meet W3C standards.
                • 5. Re: SPRY - W3C Friendly?
                  Level 7
                  "jon@cmiwebstudio" <webforumsuser@macromedia.com> wrote in message
                  news:gb2bof$18b$1@forums.macromedia.com...
                  >I will not build websites for clients that don't meet W3C standards.


                  You may want to read this working draft:
                  http://www.w3.org/TR/WCAG20-TECHS/H4.html where the author refers to 0 as a
                  possible value.

                  PS: I'm curious, do you use tables or CSS for layout ?


                  --
                  Thierry
                  http://www.TJKDesign.com/go/?0 | Articles and Tutorials


                  http://divahtml.com/products/scripts_dreamweaver_extensions.php | Extensions
                  that keep your markup clean
                  http://www.fourlevel.com/ | CSS Menus, Gallery, Tab Panels, etc
                  --

                  • 6. Re: SPRY - W3C Friendly?
                    Level 7
                    .oO(jon@cmiwebstudio)

                    > tabindex="0".... this is not valid code to pass W3C standards. Do
                    >other developers just omit this or is there a workaround?

                    I don't use Spry, so what's the actual markup that causes the error?
                    'tabindex' is valid for many elements, what does Spry do to make it
                    invalid? Can you or somebody else post some sample code or a URL?

                    Micha
                    • 7. Re: SPRY - W3C Friendly?
                      Ben M Adobe Community Professional
                      Sorry for the delay. I found the answer you are looking for:

                      http://labs.adobe.com/technologies/spry/articles/best_practices/validating_spry.html

                      The 5th paragraph down will explain your situation. The tabindex is invalid because tab indexes are only supposed to be used within Form tags as the example Thierry shows. So if you place the tabbed panels within form tags this won't be an issue. However you can remove them if you don't want users to be able to tab to them. Either way will allow your page to validate.
                      • 8. Re: SPRY - W3C Friendly?
                        Level 7
                        "Michael Fesser" <netizen@gmx.de> wrote in message
                        news:ec9ad4pk34ctgj8alsjbqmcrm9f33ie9p7@4ax.com...
                        > .oO(jon@cmiwebstudio)
                        >
                        >> tabindex="0".... this is not valid code to pass W3C standards. Do
                        >>other developers just omit this or is there a workaround?
                        >
                        > I don't use Spry, so what's the actual markup that causes the error?
                        > 'tabindex' is valid for many elements, what does Spry do to make it
                        > invalid? Can you or somebody else post some sample code or a URL?

                        I think it's because Spry use *0* for value


                        --
                        Thierry
                        http://www.TJKDesign.com/go/?0 | Articles and Tutorials


                        http://divahtml.com/products/scripts_dreamweaver_extensions.php | Extensions
                        that keep your markup clean
                        http://www.fourlevel.com/ | CSS Menus, Gallery, Tab Panels, etc
                        --

                        • 9. Re: SPRY - W3C Friendly?
                          Level 7
                          .oO(Thierry)

                          >"Michael Fesser" <netizen@gmx.de> wrote in message
                          >news:ec9ad4pk34ctgj8alsjbqmcrm9f33ie9p7@4ax.com...
                          >> .oO(jon@cmiwebstudio)
                          >>
                          >>> tabindex="0".... this is not valid code to pass W3C standards. Do
                          >>>other developers just omit this or is there a workaround?
                          >>
                          >> I don't use Spry, so what's the actual markup that causes the error?
                          >> 'tabindex' is valid for many elements, what does Spry do to make it
                          >> invalid? Can you or somebody else post some sample code or a URL?
                          >
                          >I think it's because Spry use *0* for value

                          0 is allowed, but it seems as if Spry assigns a tabindex to a 'div' or
                          something like that. On form elements & normal links it would be valid.

                          Micha
                          • 10. Re: SPRY - W3C Friendly?
                            Level 7
                            "Michael Fesser" <netizen@gmx.de> wrote in message
                            news:82cad49sfagikoqboj0ecvurvp8l58854c@4ax.com...
                            > .oO(Thierry)
                            >
                            >>"Michael Fesser" <netizen@gmx.de> wrote in message
                            >>news:ec9ad4pk34ctgj8alsjbqmcrm9f33ie9p7@4ax.com...
                            >>> .oO(jon@cmiwebstudio)
                            >>>
                            >>>> tabindex="0".... this is not valid code to pass W3C standards. Do
                            >>>>other developers just omit this or is there a workaround?
                            >>>
                            >>> I don't use Spry, so what's the actual markup that causes the error?
                            >>> 'tabindex' is valid for many elements, what does Spry do to make it
                            >>> invalid? Can you or somebody else post some sample code or a URL?
                            >>
                            >>I think it's because Spry use *0* for value
                            >
                            > 0 is allowed, but it seems as if Spry assigns a tabindex to a 'div' or
                            > something like that. On form elements & normal links it would be valid.

                            That value always confused me as the spec says that "this value must be a
                            number between 0 and 32767" [1]
                            Is 0 considered being "between 0 and 32767"? I guess it is, but that's not
                            the way I read it :-(

                            Anyway, if Spry uses tabindex on DIVs it is to make these elements
                            "focusable"to help keyboard navigation, so even if it is not "kosher" it
                            could be seen as "best practice".


                            [1] http://www.w3.org/TR/html401/interact/forms.html#adef-tabindex


                            --
                            Thierry
                            http://www.TJKDesign.com/go/?0 | Articles and Tutorials


                            http://divahtml.com/products/scripts_dreamweaver_extensions.php | Extensions
                            that keep your markup clean
                            http://www.fourlevel.com/ | CSS Menus, Gallery, Tab Panels, etc
                            --

                            • 11. Re: SPRY - W3C Friendly?
                              Level 7
                              .oO(Thierry)

                              >"Michael Fesser" <netizen@gmx.de> wrote in message
                              >news:82cad49sfagikoqboj0ecvurvp8l58854c@4ax.com...
                              >>
                              >> 0 is allowed, but it seems as if Spry assigns a tabindex to a 'div' or
                              >> something like that. On form elements & normal links it would be valid.
                              >
                              >That value always confused me as the spec says that "this value must be a
                              >number between 0 and 32767" [1]
                              >Is 0 considered being "between 0 and 32767"?

                              Yes. It's like 0 <= x <= 32767 here.

                              >I guess it is, but that's not
                              >the way I read it :-(

                              The 0 is explicitly mentioned in the part which describes how the
                              tabbing should be done in the browser:

                              | 2. Those elements that do not support the tabindex attribute or
                              | support it and assign it a value of "0" are navigated next.

                              Micha
                              • 12. Re: SPRY - W3C Friendly?
                                Level 7
                                > That value always confused me as the spec says that "this value must be a
                                > number between 0 and 32767" [1]


                                I wonder what that meeting was like...

                                - we really should have an upper limit on the tab order, eh?

                                - I agree. How about 40?

                                - I dunno, I could see SOMEONE putting more than 40 input fields on a page.

                                - hmm...Ok, how about 40,000?

                                - you nuts? Who would put 40,000 input fields on one page?

                                - OK, good point. Let's compromise: 32,767

                                - DONE!

                                -Darrel

                                • 13. Re: SPRY - W3C Friendly?
                                  Level 7
                                  It doesn't hurt that 32767 is an even power of 2, though.

                                  --
                                  Murray --- ICQ 71997575
                                  Adobe Community Expert
                                  (If you *MUST* email me, don't LAUGH when you do so!)
                                  ==================
                                  http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                                  http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                                  ==================


                                  "darrel" <notreal@notreal.com> wrote in message
                                  news:gbau7p$ei8$1@forums.macromedia.com...
                                  >> That value always confused me as the spec says that "this value must be a
                                  >> number between 0 and 32767" [1]
                                  >
                                  >
                                  > I wonder what that meeting was like...
                                  >
                                  > - we really should have an upper limit on the tab order, eh?
                                  >
                                  > - I agree. How about 40?
                                  >
                                  > - I dunno, I could see SOMEONE putting more than 40 input fields on a
                                  > page.
                                  >
                                  > - hmm...Ok, how about 40,000?
                                  >
                                  > - you nuts? Who would put 40,000 input fields on one page?
                                  >
                                  > - OK, good point. Let's compromise: 32,767
                                  >
                                  > - DONE!
                                  >
                                  > -Darrel

                                  • 14. Re: SPRY - W3C Friendly?
                                    Level 7
                                    .oO(darrel)

                                    >> That value always confused me as the spec says that "this value must be a
                                    >> number between 0 and 32767" [1]
                                    >
                                    >
                                    >I wonder what that meeting was like...
                                    >
                                    > - we really should have an upper limit on the tab order, eh?
                                    >
                                    > - I agree. How about 40?
                                    >
                                    > - I dunno, I could see SOMEONE putting more than 40 input fields on a page.
                                    >
                                    > - hmm...Ok, how about 40,000?
                                    >
                                    > - you nuts? Who would put 40,000 input fields on one page?
                                    >
                                    > - OK, good point. Let's compromise: 32,767
                                    >
                                    > - DONE!

                                    ;-)

                                    Actually this number has a meaning, even though it's more an
                                    implementation detail for the browser vendors. 32767 is the positive
                                    maximum that can be stored in a signed 16 bit integer variable. It
                                    wouldn't make much sense to say "between 0 and 1000" for example,
                                    because internally it would still be stored with at least 16 bit.

                                    Additionally I can imagine situations where you could use such large
                                    numbers. Firstly, tabindex applies to all types of form controls. In a
                                    long script-generated table with a lot of checkboxes or radio buttons
                                    you might need some more tabindex values. Secondly, you could also
                                    assign numbers with big steps between them (e.g. 100, 200, 300, ...) to
                                    leave room for further additions.

                                    It's usually good to have some more (number) space available than an
                                    unnecessary arbitrary restriction.

                                    Micha
                                    • 15. Re: SPRY - W3C Friendly?
                                      Level 7
                                      .oO(Murray *ACE*)

                                      >It doesn't hurt that 32767 is an even power of 2, though.

                                      That would be 32768. ;-)

                                      Micha
                                      • 16. Re: SPRY - W3C Friendly?
                                        Level 7
                                        "Michael Fesser" <netizen@gmx.de> wrote in message
                                        news:fl1id4tm6nl3hptcchp4mk5vt2ubttvpta@4ax.com...
                                        > .oO(Murray *ACE*)
                                        >
                                        >>It doesn't hurt that 32767 is an even power of 2, though.
                                        >
                                        > That would be 32768. ;-)

                                        May be Murray is talking about the number of possible values as counting 0
                                        we have 32768

                                        --
                                        Thierry
                                        http://www.TJKDesign.com/go/?0 | Articles and Tutorials


                                        http://divahtml.com/products/scripts_dreamweaver_extensions.php | Extensions
                                        that keep your markup clean
                                        http://www.fourlevel.com/ | CSS Menus, Gallery, Tab Panels, etc
                                        --

                                        • 17. Re: SPRY - W3C Friendly?
                                          Level 7
                                          Yep - zero-based counting.

                                          --
                                          Murray --- ICQ 71997575
                                          Adobe Community Expert
                                          (If you *MUST* email me, don't LAUGH when you do so!)
                                          ==================
                                          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                                          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                                          ==================


                                          "Thierry" <thierry@invalid.com> wrote in message
                                          news:gbb31t$k7i$1@forums.macromedia.com...
                                          > "Michael Fesser" <netizen@gmx.de> wrote in message
                                          > news:fl1id4tm6nl3hptcchp4mk5vt2ubttvpta@4ax.com...
                                          >> .oO(Murray *ACE*)
                                          >>
                                          >>>It doesn't hurt that 32767 is an even power of 2, though.
                                          >>
                                          >> That would be 32768. ;-)
                                          >
                                          > May be Murray is talking about the number of possible values as counting 0
                                          > we have 32768
                                          >
                                          > --
                                          > Thierry
                                          > http://www.TJKDesign.com/go/?0 | Articles and Tutorials
                                          >
                                          >
                                          > http://divahtml.com/products/scripts_dreamweaver_extensions.php |
                                          > Extensions that keep your markup clean
                                          > http://www.fourlevel.com/ | CSS Menus, Gallery, Tab Panels, etc
                                          > --
                                          >