Accessibility: Use Uploaded File Descriptions

The file upload dialog asks for a description of the image or file to be uploaded. Use this as the default alt-text for the image and as a title attribute for a file link.
This commit is contained in:
Jacques Distler 2007-10-09 02:51:38 -05:00
parent 179a0a9cb2
commit 0eb723e125
3 changed files with 20 additions and 12 deletions

View file

@ -47,6 +47,11 @@ class Web < ActiveRecord::Base
WikiFile.find_by_file_name(file_name) != nil
end
def description(file_name)
file = WikiFile.find_by_file_name(file_name)
file.description if file
end
def markup
read_attribute('markup').to_sym
end