Description

  1. Comments in Moin1.6 are only marked by a div-wrapper causing the comment to be displayed in some nicely colored box. Alas with this solution there is no way for people using screenreaders to recognize when a comment starts and when a comment ends since the difference is only optically marked by colors.
  2. But this is not only a topic for visually impaired people. Normal users are also confronted with this when css is disabled. There again is no way now to tell where a comment starts and where a comment ends.

Steps to reproduce

  1. do this...

Example

Component selection

Details

MoinMoin Version

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

This could easily be solved by some extra text injected at the beginning and the end of the comment, which is not displayed on the screen but read by screenreaders and displayed when CSS is disabled.

Here is a patch of parser/moin_text_wiki.py for Moin (moin-1-6-main-4cfb61592fe4):

   1 --- text_moin_wiki_old.py	2007-02-28 16:19:38.000000000 +0100
   2 +++ text_moin_wiki.py	2007-03-01 19:23:54.000000000 +0100
   3 @@ -931,6 +931,7 @@
   4              strings, outputting verbatim any intervening text.
   5          """
   6          self.formatter = formatter
   7 +        _ = self._
   8          self.hilite_re = self.formatter.page.hilite_re
   9  
  10          # prepare regex patterns
  11 @@ -965,7 +966,11 @@
  12              if 'comment' in self.wrapping_div_class.split():
  13                  # show comment divs depending on user profile (and wiki configuration)
  14                  div_kw['style'] = self.request.user.show_comments and "display:''" or "display:none"
  15 -            self.request.write(self.formatter.div(1, **div_kw))
  16 +                self.request.write(self.formatter.div(1, **div_kw))
  17 +                div_kw = {'css_class': 'screenreader_info', }
  18 +                self.request.write(self.formatter.text(_('[comment section begin]'), **div_kw))
  19 +            else:
  20 +                self.request.write(self.formatter.div(1, **div_kw))
  21  
  22          # Main loop
  23          for line in self.lines:
  24 @@ -1122,6 +1127,9 @@
  25          if self.in_table: self.request.write(self.formatter.table(0))
  26  
  27          if self.wrapping_div_class:
  28 +            if 'comment' in self.wrapping_div_class.split():
  29 +                div_kw = {'css_class': 'screenreader_info', }
  30 +                self.request.write(self.formatter.text(_('[comment section end]'), **div_kw))
  31              self.request.write(self.formatter.div(0))
  32  
  33      # Private helpers ------------------------------------------------------------

text_moin_wiki.diff

To get this correctly work please add following CSS class to the theme's screen.css:

/* Visually hidden information for screenreaders,
i.e. is read but not displayed */
.screenreader_info {
        position: absolute;
        top: -10000px;
        left: -10000px;
}

Add display:none for this class in projection.css and print.css???

-- OliverSiemoneit 2007-03-01 18:49:30

Please check the rest of what's unclear and submit a complete patch. Is screenreader_info some standardized way or just used by a single or few programs? -- ThomasWaldmann 2007-05-05 19:44:47

} }}}

}}}

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/1.6devCommentSectionsNotAccessibleByScreenreaderOrWithCssDisabled (last edited 2007-10-29 19:08:38 by localhost)