w3c / wai-website

This repository hosts the WAI Website.
https://www.w3.org/WAI/
Other
59 stars 293 forks source link

Add 'view source' feature to view code of complete examples #749

Open iadawn opened 9 years ago

iadawn commented 9 years ago

This could be used in multiple places to make it easy to find the code where there are good practice ideas.

bakkenb commented 9 years ago

I like this idea. Would it be a link under the existing example box? Where would this show up for each tip that it could be used for?

iadawn commented 9 years ago

My current idea, is to have a link or icon at the bottom of the example box which would open up a modal window showing a more complete coding example.

shawna-slh commented 9 years ago

I only looked at this quickly. Did I understand correctly that there is a suggestion to add View Source Code of just alt text? I [strongly] do not support that. The code is simple. Pretty much everyone who needs to do it knows how. Don't add complexity to the Tips pages for it.

I didn't get a chance to look at the others. Sorry.

nitedog commented 9 years ago

Here is the list of Tips where we propose to add "View Source Code":

[[ Designing: Interactive elements Designing: Associated labels Designing: Feedback Designing: Alt text Designing: auto-starting (note: for this example, the link will go to the complete example in the tutorial and will include an icon to indicate it goes elsewhere) Writing: Alt text Developing: Non-standard elements Developing: Keyboard accessibility ]]

nitedog commented 9 years ago

Regarding alt-text: in the Designing page, for example, different coding techniques are used, which is why we want to make the source code easier to access.

davidberman commented 9 years ago

I like that the source code is available, even in simple cases, as it reinforces where source code is approachable for those who would otherwise be intimidated or unsure if they "get it".