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

Accessibility in Emails #728

Open
elliottregan opened this issue Mar 13, 2017 · 9 comments
Open

Accessibility in Emails #728

elliottregan opened this issue Mar 13, 2017 · 9 comments
Labels

Comments

@elliottregan
Copy link

How can we reproduce this bug?

Any component that generates a <table> element.

What did you expect to happen?

Add role="presentation" to the <table>.

What happened instead?

Without this ARIA Role, screen readers try to read the table as tabular data, which is incorrect.

What email clients does this happen in?

All, when a screen reader is being used.


Most of the time you can add a role="presentation" to the Inky component, in the case of <center>, it does not get applied correctly. Ideally, that role would automatically get applied during the build system to keep the working markup cleaner. I don't think there are any drawbacks to this because if you really wanted to display a <table> as tabular data, you would just build the table using the <table> element, not <container>.

Further Reading: http://blog.rebelmail.com/accessibility-in-email-part-ii/

@elliottregan
Copy link
Author

I'm happy to submit a PR for this, but unsure of the best approach.

@didoesdigital
Copy link

I ran into this issue again today. Having role="presentation" automatically added to tables in Inky components would be a boon for accessibility, but I wonder if it's also worth updating documentation to let people know how to do this.

@davidpustai
Copy link

I've made a PR in the Inky repo. It might take some time before it gets approved and bubbles all the way into foundation-emails. If there's anyone who can help, that would be splendid, cause these repos seem dead.

Until then...
...since I am not using any tables in my emails other then the generated ones by Inky, for now I just go with a simple task, that I call everywhere after inline. It appends the role="presentation" to each table. I hope this hack helps someone:

return gulp.src('dist/**/*.html')
  .pipe($.if(PRODUCTION, $.replace('<table', '<table role="presentation"')))
  .pipe(gulp.dest('dist'));

@garyanikin
Copy link

Any updates?

@DanielRuf
Copy link
Contributor

Any updates?

No as you can see =)

Any help is very welcome.

@DanielRuf
Copy link
Contributor

I've made a PR in the Inky repo.

Not sure wich one. In such cases please always link it.

@DanielRuf
Copy link
Contributor

There it is: https://github.com/foundation/inky/pull/102/files
Also relevant: foundation/inky#114

@nicksiscoe
Copy link

Bump because this would be an improvement still 💯

@elcaptain
Copy link

+1

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

No branches or pull requests

8 participants