Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add accessibility attibute in a_img. #113

Open
leovalais opened this issue Jan 7, 2019 · 0 comments
Open

Add accessibility attibute in a_img. #113

leovalais opened this issue Jan 7, 2019 · 0 comments

Comments

@leovalais
Copy link
Contributor

let img_link contents = function
| [Some src] ->
let file = Global.current_file () in
let root, images = Global.(root (), the_images ()) in
let uri = Paths.(rewind root file +/+ images +/+ src) in
let alt = Filename.basename src in
Lwt.return [Html.img ~src:uri ~alt ()]

The Html.img's alt attribute is set to the filename instead of the content's text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant