Re: [Tutorial Feedback]

Hi Cynthia,

On 15 Sep 2019, at 21:37, Cynthia Lockley wrote:

> In the Tips and Tricks section of the Web Accessibility Tutorials 
> (Guidance
> on how to create websites that meet WCAG)
> <https://www.w3.org/WAI/tutorials/>on
> https://www.w3.org/WAI/tutorials/tables/tips/
>
> it says
>
>    -
>
>    *Alignment:* Align text to the left and numeric data to the right 
> (in
>    left-to-right languages), so that people using larger text sizes or 
> smaller
>    screens will be able to find it. This is especially useful if a 
> cell spans
>    more than one column. It’s helpful to give column headers the 
> same
>    alignment as the data in the cells below.
>
> but it doesn't say how to do this. I tried using style="text-align: 
> left;"
> in the following:
>
> <thead>
> <tr class="headertype1_pad7">
> <th id="c1" scope="col" style=text-align: left;">Membership 
> Category</th>
> <th id="c2" scope="col" style=text-align: left;">2020 Rate</th>
> </tr>
> </thead>

You’re missing opening quotes on your style attribute:

```
<th id="c1" scope="col" style=text-align: left;">
   Membership Category
</th>
```

Should be:

```
<th id="c1" scope="col" style="text-align: left;">
   Membership Category
</th>
```

>
> <tbody>
> <tr class="white_pad7" style="vertical-align: top;">
> <td scope="row" colspan="1" style="font-size: 100%; background-color:
> #fff;">
> Professional &amp; Academic</td>
> <td scope="row" colspan="1" style="font-size: 100%; background-color:
> #fff;">
> $225</td>
> </tr>
>
> my syntax checker said:
>
> "Document type doesn't permit attribute “left;"” within element 
> “<th>”.
>
> "Document type doesn't permit attribute “scope” within element 
> “<td>”.

You also cannot use `scope` on the `<td>` element, as you can only scope 
table headings.

>
> Why can't it go into the style element?

I hope that has helped.

Best,
Eric Eggert




--

Eric Eggert
Web Accessibility Specialist
Web Accessibility Initiative (WAI) at World Wide Web Consortium (W3C)

Received on Tuesday, 17 September 2019 10:16:16 UTC