5 Replies Latest reply on Dec 23, 2008 10:05 AM by unioman

    Dreamweaver rewriting 508 code?

    unioman
      We are converting some client documents into 508 accessible html files. Some of these pages have complex tables. Often, there is a complex table for 1 fiscal year that is identical to the one for another fiscal year. When coding these, we used "t1c1" to indicate the first table, column 1 as an example. So we may have a <th> header using id="t1c1" and a td cell using "headers = "t1c1 ...".

      However, if we copy the table to another part of the page to then update that with "t2c1...", to reflect the new 2nd table, Dreamweaver rewrites all the id info (since it's identical to the first table until we change it) - so all row numbers are renumbered. If the first table ended as t1r19, the 2nd table starts with t1r20. So now, rather than doing a simple search/replace for "t1" and making it a "t2", we have to adjust all these headers for the 2nd table manually.

      I found a way around this - to paste the table into a blank html page, do the search/replace there, then copy back to the first page (since the ids are different, Dreamweaver doesn't see a conflict among ids and so it doesn't rewrite that code).

      BUT - it would be nice to be able to turn off any rewriting for this type of situation. I turned off the rewriting in the preferences, but it still rewrites code when it sees multiple elements having the same ID - because it doesn't know what id's we want to use (when it rewrites the code, all the cells referring to the id (via the headers attribute) are NOT updated, so the references to the correct headers get broken.

      Thanks.
        • 1. Re: Dreamweaver rewriting 508 code?
          Level 7
          unioman wrote:
          > BUT - it would be nice to be able to turn off any rewriting for this type of
          > situation.

          This has nothing to do with 508. YOU can solve this issue by:
          Edit -> Preferences, Code Rewriting category, unchecking "Rename form items when pasting"



          --
          Danilo Celic
          | http://blog.extensioneering.com/
          | WebAssist Extensioneer
          | Adobe Community Expert
          • 2. Re: Dreamweaver rewriting 508 code?
            Level 7
            unioman wrote:
            > BUT - it would be nice to be able to turn off any rewriting for this type of
            > situation.

            If you feel this is an important improvement to the way Dreamweaver
            works, please submit a formal enhancement request to Adobe through the
            official form:

            http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

            --
            David Powers, Adobe Community Expert
            Author, "The Essential Guide to Dreamweaver CS4",
            "PHP Solutions" & "PHP Object-Oriented Solutions"
            http://foundationphp.com/
            • 3. Re: Dreamweaver rewriting 508 code?
              Level 7
              danilocelic AdobeCommunityExpert wrote:
              > unioman wrote:
              >> BUT - it would be nice to be able to turn off any rewriting for this
              >> type of situation.
              >
              > This has nothing to do with 508. YOU can solve this issue by:
              > Edit -> Preferences, Code Rewriting category, unchecking "Rename form
              > items when pasting"

              Hmmm, read that wrong I guess. As IDs have to be unique, DW is trying to do you a favor. One thing that you could try to do would be to use Regular Expressions in the find and replace, and make sure to only check for the current selection (selected text?), rather than the entire document. Maybe something like this:
              In selected text
              find: id="t(\d*)c(\d*)"
              replace: id="t2c$2"



              --
              Danilo Celic
              | http://blog.extensioneering.com/
              | WebAssist Extensioneer
              | Adobe Community Expert
              • 4. Re: Dreamweaver rewriting 508 code?
                Level 7
                unioman,

                DW only renames the IDs if you copy/paste in Design View. Do the
                copy/paste in Code View and the original IDs are preserved.

                HTH,
                Randy


                > We are converting some client documents into 508 accessible html files. Some of
                > these pages have complex tables. Often, there is a complex table for 1 fiscal
                > year that is identical to the one for another fiscal year. When coding these,
                > we used "t1c1" to indicate the first table, column 1 as an example. So we may
                > have a <th> header using id="t1c1" and a td cell using "headers = "t1c1 ...".
                >
                > However, if we copy the table to another part of the page to then update that
                > with "t2c1...", to reflect the new 2nd table, Dreamweaver rewrites all the id
                > info (since it's identical to the first table until we change it) - so all row
                > numbers are renumbered. If the first table ended as t1r19, the 2nd table starts
                > with t1r20. So now, rather than doing a simple search/replace for "t1" and
                > making it a "t2", we have to adjust all these headers for the 2nd table
                > manually.
                >
                > I found a way around this - to paste the table into a blank html page, do the
                > search/replace there, then copy back to the first page (since the ids are
                > different, Dreamweaver doesn't see a conflict among ids and so it doesn't
                > rewrite that code).
                >
                > BUT - it would be nice to be able to turn off any rewriting for this type of
                > situation. I turned off the rewriting in the preferences, but it still rewrites
                > code when it sees multiple elements having the same ID - because it doesn't
                > know what id's we want to use (when it rewrites the code, all the cells
                > referring to the id (via the headers attribute) are NOT updated, so the
                > references to the correct headers get broken.
                >
                > Thanks.
                >
                • 5. Re: Dreamweaver rewriting 508 code?
                  unioman Level 1
                  Yes, I just figured that out - only rewrites if pasting into the Design view. Thanks for all the help!