פרסומים שנוצרו על-ידי David Scotson

Moodle in English -> Lounge -> Recommendations for a Home Computer? -> Re: Recommendations for a Home Computer?

על ידי David Scotson בתאריך

While we're dispelling urban legends, the slightly more complex truth about Jobs, Xerox and the Mac is discussed at folklore.org by one of the people who was there.

Folklore.org is a fascinating resource for Mac history told in the first person, I particularly like trivia like the source of the unusual symbol used for the menu command key

Jeff Raskin also has a slightly more bitter take on the misattribution of his work to others (meaning both Xerox and Jobs amongst others) though he apparently has a tendency to think he invented everything.

That seems like quite a computer-science-like approach i.e. starting counting at 0. I for one am not sure how it would map onto the actual rows.

Essentially they could be given any two distinct names but if, for example, I'm implementing a new table for Moodle do I make the first row (that is, row number 1) class="r0" or class="r1"? I don't think it's obvious. On the other side, as a theme designer, if I want the first and third etc rows (#1,#3, ...) to be blue, do I change the class for r0 or r1?

I'd err towards making class names as descriptive as variable names in the code which I think in this case means using the word "odd" and "even" e.g. row-odd & row-even, odd-row & even-row, tr-odd & tr-even or similar.

If brevity is really the key then r1 and r2 would make more sense to me.

Yes, I see what you mean. Note that the info "Submission Data" could perhaps be placed in the caption tag, or simply placed in a header tag outside of the table i.e. h1 tags if the table is the main or sole content of the page.

thead is described in the spec as enabling ... user agents to support scrolling of table bodies independently of the table head and foot. When long tables are printed, the table head and foot information may be repeated on each page that contains table data.

This may seem rather esoteric, but some accessibility software takes advantage of this info too so I think it is worth including.

Some of the examples I was talking about, with multiple th tags distributed throughout the table can be seen here:

Techniques for Accessible HTML Tables

In those examples (if you imagine a table with hundreds of entries) you can see why the horizontal column headers would need to be repeated over multiple pages or remain static while the data scrolls (as in desktop GUI apps). The row headers on the other hand are located at the left hand side of the row and can be read across easily as they are always attached to the relevant data.

edit: Also, note that every table should be identified with an id. Your example of table th is too wide anyway, (as is table thead th) because it would apply to every single table header in the entire site, including many user entered data tables. This is shown in the "standardxhtml" that used that exact selector to attach the gradient background to several of the tables in Moodle's interface that had no suitable id or class. Unfortunately this also affected all tables in user entered resources, forum posts etc.

"you probably want different formatting for table thead th and for table tbody td"

Do you mean different formatting for table thead th and for table tbody th i.e. subsidiary headers in more complex tables of data since table th and table td selectors should be enough for the majority of tables. Of course that only applies to the selectors in the CSS because if tbody and thead aren't added in the HTML then no-one will be able to use them no matter how good their CSS is.

And in case anyone reading this gets confused, remember this entire discussion is about tables used for tabular data with rows and columns of information, not tables used for visually grid-based layout and formatting. For presentational layout tables only 3 of the table tags (table, tr, and td) should be used to prevent accessability issues.

I edited my post that Martin replies to above roughly 30 minutes after I originally posted, eventually diagreeing with myself, in case anyone reading this later is confused.