Hi. I''ve been testing different generated with Rubi On Rails pages for web Accessibility. Is there a way of making them in accesible HTML or XHTML? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Vishnu Gopal
2006-Nov-23 11:09 UTC
Re: Does Rubi On Rails Generate XHTML or Accessible HTML ?
Yes. Make your own views, if the generated ones (using scaffolding) don''t fit your needs. Rails can generate crappy HTML or stuff that passes strictest of accessibility guidelines (or XML or even plain text). Vish On 11/23/06, VPC <victorpablosceruelo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi. > > I''ve been testing different generated with Rubi On Rails pages for web > Accessibility. > > Is there a way of making them in accesible HTML or XHTML? > > Thanks. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
VPC wrote:> I''ve been testing different generated with Rubi On Rails pages for web > Accessibility.> Is there a way of making them in accesible HTML or XHTML?After a "functional" test that calls get :index or similar, the returned HTML is stored in html_document.root I triggered a thread about XHTML recently; the output is reputedly as well-formed as our browsers will permit. (Funny how that excuse always works, even in Rails!) To test for accessibility, I would start here: def accessible? File.open(''scratch.html'', ''w'') do |fh| fh.write(html_document.root) end system(''tidy scratch.html'') end # CONSIDER better system to trap syntax errors in rhtml Now Tidy will scan the HTML and complain about things like missing ALT tags. Many other accessibility validators are probably available, too. Add command line arguments to Tidy to make it force XHTML, if you need that. You can change system('''') to `` to collect the report in a string, and search it with regular expressions, to let accessible? return a boolean, instead of just spew! -- Phlip http://www.greencheese.us/ZeekLand <-- NOT a blog!!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
If you want to test accessibility (as distinct from testing validity), there is a this -http://www.standards-schmandards.com/2006/accessibility-in-ruby-on-rails/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---