Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4792172

Enable framed pages to be bookmarked: replace left-hand frames with CSS position

XMLWordPrintable

      The W3C accessiblity guidelines recommend the use of CSS stylesheet
      positioning in place of frames. The following is quoted from their website.
      If our user base is substantially on browsers that support CSS, we should
      consider providing this as an alterative or replacement for frames.

      Frames as implemented today (with the FRAMESET, FRAME, and IFRAME elements) are problematic for several reasons:

        - Without scripting, they tend to break the "previous page" functionality
          offered by browsers.
        - It is impossible to refer to the "current state" of a frameset with a URI;
          once a frameset changes contents, the original URI no longer applies.
        - Opening a frame in a new browser window can disorient or simply annoy users.
          [This item is not relevant for Javadoc, as it does not open new windows]

      Source:
      HTML Techniques for Web Content Accessibility Guidelines 1.0)
      http://www.w3.org/TR/WCAG10-HTML-TECHS/#frames

      ----

      We provide an alternative to frames that uses HTML 4.01 and CSS and
      addresses many of the limitations of today's frame implementations.

      As an alternative to frames, we encourage you to try the following:

        1. Create one document for the navigation mechanism
           (call it "nav.html"). A separate document means that
           the navigation mechanism may be shared by more than one document.

        2. In each document requiring the navigation mechanism, include
           it at the bottom of the document with the following (or
            similar) OBJECT markup:
           
             Example.

                <P>
                <OBJECT data="nav.html">
                Go to the <A href="nav.html">table of contents</A>
                </OBJECT>

           Putting the navigation mechanism at the end of the document
           means that when style sheets are turned off, users have
           access to the document's important information first.

        3. Use style sheets to position the navigation mechanism where
           you want on the screen. For example, the following CSS rule
           floats the navigation bar to the left of the page and makes
           it take up 25% of the available horizontal space:

                OBJECT { float: left; width: 25% }

           The following CSS rule attaches the navigation mechanism
           to the bottom-left corner of the page of the page and keeps
           it there even if the user scrolls down the page:

                OBJECT { position: fixed; left: 0; bottom: 0 }

      Source:
      10.6 Alternatives to frames
      http://www.w3.org/TR/WCAG10-HTML-TECHS/#alt-frames

            jhosunw Jamie Ho (Inactive)
            dkramersunw Douglas Kramer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: