Problem with W3C validator

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • D. D. Brierton

    Problem with W3C validator

    I'm having a problem with the W3C validator:



    I don't understand this error message:

    Line 117, column 61: an attribute specification must start with a name or
    name token

    ....ef="/" accesskey="H" title="Access Key: Alt+H" id="here"">Home </a>

    Check for stray quotes or incomplete attribute definitions.

    Note that the final " before >Home</a> is what the validator thinks is
    needed, not what is in the source. The only thing I can think is that
    either the : or the + in the title attribute value are causing a problem
    but I can't think why. Any suggestions?

    TIA, Darren

    --
    =============== =============== =============== =============== ==========
    D. D. Brierton darren@dzr-web.com www.dzr-web.com
    Trying is the first step towards failure (Homer Simpson)
    =============== =============== =============== =============== ==========

  • Chris Morris

    #2
    Re: Problem with W3C validator

    "D. D. Brierton" <darren@dzr-web.com> writes:[color=blue]
    > I'm having a problem with the W3C validator:
    >
    > http://validator.w3.org/check?uri=ht...missive.com%2F
    >
    > ...ef="/" accesskey="H" title="Access Key: Alt+H" id="here"">Home </a>
    >
    > Note that the final " before >Home</a> is what the validator thinks is
    > needed, not what is in the source.[/color]

    $ wget -q -O- http://www.microemissive.com/ | grep 'Home</a>'
    <a href="/" accesskey="H" title="Access Key: Alt+H" id="here"">Home </a>
    $

    Looks like it's in the source to me. What makes you think it isn't?

    --
    Chris

    Comment

    • Neal

      #3
      Re: Problem with W3C validator

      On Tue, 31 Aug 2004 14:53:27 +0100, D. D. Brierton <darren@dzr-web.com>
      wrote:
      [color=blue]
      > I'm having a problem with the W3C validator:
      >
      > http://validator.w3.org/check?uri=ht...missive.com%2F
      >
      > I don't understand this error message:
      >
      > Line 117, column 61: an attribute specification must start with a name or
      > name token
      >
      > ...ef="/" accesskey="H" title="Access Key: Alt+H" id="here"">Home </a>
      >
      > Check for stray quotes or incomplete attribute definitions.
      >
      > Note that the final " before >Home</a> is what the validator thinks is
      > needed, not what is in the source. The only thing I can think is that
      > either the : or the + in the title attribute value are causing a problem
      > but I can't think why. Any suggestions?[/color]

      I don't see any reason why you are using two "'s in a row at the end.
      What's your reasoning for having that extra "?

      Unless you can give a darn good reason for that to be double double
      quotes, kill one in each case. Do that and add the </li> tags where
      missing, making the markup look like

      <li>
      <a href="/" accesskey="H" title="Access Key: Alt+H" id="here">Home </a>
      </li>

      and your page should validate.

      Comment

      • D. D. Brierton

        #4
        Re: Problem with W3C validator

        On Tue, 31 Aug 2004 15:08:14 +0100, Chris Morris wrote:

        [color=blue]
        > $ wget -q -O- http://www.microemissive.com/ | grep 'Home</a>'
        > <a href="/" accesskey="H" title="Access Key: Alt+H" id="here"">Home </a>
        > $
        >
        > Looks like it's in the source to me. What makes you think it isn't?[/color]

        Arghh -- sorry, you're correct. Mozilla's view-source *doesn't* show it. I
        thought view-source showed you the actual source code Mozilla received
        from the server, not what Mozilla had parsed it as.

        Thanks for that.

        Best, Darren

        --
        =============== =============== =============== =============== ==========
        D. D. Brierton darren@dzr-web.com www.dzr-web.com
        Trying is the first step towards failure (Homer Simpson)
        =============== =============== =============== =============== ==========

        Comment

        • Neal

          #5
          Re: Problem with W3C validator

          On Tue, 31 Aug 2004 15:17:10 +0100, D. D. Brierton <darren@dzr-web.com>
          wrote:
          [color=blue]
          > On Tue, 31 Aug 2004 15:08:14 +0100, Chris Morris wrote:
          >
          >[color=green]
          >> $ wget -q -O- http://www.microemissive.com/ | grep 'Home</a>'
          >> <a href="/" accesskey="H" title="Access Key: Alt+H" id="here"">Home </a>
          >> $
          >>
          >> Looks like it's in the source to me. What makes you think it isn't?[/color]
          >
          > Arghh -- sorry, you're correct. Mozilla's view-source *doesn't* show it.
          > I
          > thought view-source showed you the actual source code Mozilla received
          > from the server, not what Mozilla had parsed it as.[/color]

          Mozilla's view source window leaves much to be desired. I generally use a
          text editor, Opera and IE allow me to do so, but not Mozilla.

          Alternately, check "Show Source" in the validator, the actual source will
          be presented below the results.

          Comment

          • D. D. Brierton

            #6
            Re: Problem with W3C validator

            On Tue, 31 Aug 2004 10:13:41 -0400, Neal wrote:
            [color=blue]
            > I don't see any reason why you are using two "'s in a row at the end.
            > What's your reasoning for having that extra "?[/color]

            I didn't realise that I was! The navbar is generated by a PHP script, and
            Mozilla's view-source was NOT showing the second " and so I misread the
            validator error as saying that I *needed* an extra " -- e.g. because for
            some reason it thought that one of the attributes wasn't closed properly.

            Now I can see that the extra closing " was being generated by my PHP
            scripts, and I've fixed it (and fixed the problem with the missing </ul>
            in the nested lists). The fix should be up soon.

            Thanks, Darren

            --
            =============== =============== =============== =============== ==========
            D. D. Brierton darren@dzr-web.com www.dzr-web.com
            Trying is the first step towards failure (Homer Simpson)
            =============== =============== =============== =============== ==========

            Comment

            • George Lund

              #7
              access keys

              In message <pan.2004.08.31 .13.53.27.14503 9@dzr-web.com>, D. D. Brierton
              <darren@dzr-web.com> writes[color=blue]
              >...ef="/" accesskey="H" title="Access Key: Alt+H" id="here"">Home </a>[/color]

              Your query is obviously answered already, but on another issue:

              Why put the access key in the title attribute? It doesn't describe the
              target of the link, which is what title is for in the case of <a>.

              And it isn't even very useful, because the usual way to see the title is
              to hover over the link with the mouse - at which point one would surely
              click rather than go back to the keyboard!

              (It's pretty rubbish the way browsers don't give any indication of what
              the access key is, but I just disagree that title is a very good way of
              getting around that problem...)

              --
              George Lund

              Comment

              • Chris Morris

                #8
                Re: access keys

                George Lund <george@lund.co .uk> writes:[color=blue]
                > In message <pan.2004.08.31 .13.53.27.14503 9@dzr-web.com>,
                > D. D. Brierton <darren@dzr-web.com> writes[color=green]
                > >...ef="/" accesskey="H" title="Access Key: Alt+H" id="here"">Home </a>[/color]
                >
                > Your query is obviously answered already, but on another issue:
                >
                > Why put the access key in the title attribute? It doesn't describe
                > the target of the link, which is what title is for in the case of <a>.[/color]

                Not necessarily. It's one good use of it (where the link text alone
                isn't sufficient) but it could be used for any other supplemental
                information.
                [color=blue]
                > And it isn't even very useful, because the usual way to see the title
                > is to hover over the link with the mouse - at which point one would
                > surely click rather than go back to the keyboard![/color]

                That is true, but only in browsers that require hovering to show the
                title attribute. And it's also not necessarily correct because of the
                various different ways of triggering accesskeys.
                [color=blue]
                > (It's pretty rubbish the way browsers don't give any indication of
                > what the access key is, but I just disagree that title is a very good
                > way of getting around that problem...)[/color]

                Well, browser accesskey implementation in general is fairly bad. And
                inconsistent - Alt+H in some, Ctrl+H in others, Shift+Esc,H in
                Opera. Only Opera's implementation avoids the possibility of
                collisions with other keys (Alt+H minimises the browser for me, Ctrl+H
                is help, etc.)

                Some people recommend to use numeric accesskeys to get around this,
                but on my system Alt+number switches between different workspaces on
                the desktop and so would never be picked up by the browser (and if the
                browser did pick it up it would switch between tabs).

                --
                Chris

                Comment

                • D. D. Brierton

                  #9
                  Re: access keys

                  On Wed, 01 Sep 2004 20:54:20 +0100, George Lund wrote:
                  [color=blue]
                  > In message <pan.2004.08.31 .13.53.27.14503 9@dzr-web.com>, D. D. Brierton
                  > <darren@dzr-web.com> writes[color=green]
                  >>...ef="/" accesskey="H" title="Access Key: Alt+H" id="here"">Home </a>[/color]
                  >
                  > Your query is obviously answered already, but on another issue:[/color]

                  Oops -- I just noticed your follow-up ...
                  [color=blue]
                  > Why put the access key in the title attribute? It doesn't describe the
                  > target of the link, which is what title is for in the case of <a>.[/color]

                  I agree -- it is sub-optimal. It's the technique I am using for now until
                  I can think of a better way of doing it.
                  [color=blue]
                  > And it isn't even very useful, because the usual way to see the title is
                  > to hover over the link with the mouse - at which point one would surely
                  > click rather than go back to the keyboard![/color]

                  Yes! I am aware of these shortcomings. In fact, accesskeys just seem
                  pretty broken to me in general, but I include them in an effort to be a
                  good citizen.
                  [color=blue]
                  > (It's pretty rubbish the way browsers don't give any indication of what
                  > the access key is, but I just disagree that title is a very good way of
                  > getting around that problem...)[/color]

                  Unfortunately, in all my reading I am yet to come across a good way of
                  using accesskeys. All the techniques I've seen are beset with problems.

                  Best, Darren

                  --
                  =============== =============== =============== =============== ==========
                  D. D. Brierton darren@dzr-web.com www.dzr-web.com
                  Trying is the first step towards failure (Homer Simpson)
                  =============== =============== =============== =============== ==========

                  Comment

                  • Jukka K. Korpela

                    #10
                    Re: access keys

                    "D. D. Brierton" <darren@dzr-web.com> wrote:
                    [color=blue]
                    > In fact, accesskeys just seem
                    > pretty broken to me in general, but I include them in an effort to be a
                    > good citizen.[/color]

                    I noble motive, but using access keys generally doesn't help people, and
                    doesn't make you a better citizen. In addition to being largely ignored
                    (due to limitations of user agents and users), they can cause real harm -
                    especially to people with disabilities. For example, suppose you are
                    accustomed to using Alt+o to open your current browser's help system. One
                    day you visit a page and need some help from the browser, and you type
                    Alt+o. Suddenly something completely different happens - something that
                    the page author associated with your Alt+o by using accesskey="o".

                    Accesskeys are fundamentally broken, since they have been implemented
                    using the same technique as browsers' built-in (or programmable)
                    shortcuts, thereby clashing with them. And those shortcuts are crucial to
                    many people (e.g., those who cannot use a mouse) and a great convenience
                    to many people who like to work with keyboard control - after all, such
                    things explain why accesskey was invented in the first place.

                    --
                    Yucca, http://www.cs.tut.fi/~jkorpela/
                    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

                    Comment

                    Working...