Templat:Award category
This is a wrapper that goes around an award category name in layout tables in articles such as 87th Academy Awards. Your use of this template will help make awards lists which use layout tables be accessible to blind visitors to Wikipedia.
Penggunaan
suntingTypical usage would be:
{{Award category|#eedd82|[[Academy Award for Best Picture|Best Picture]]}}
which produces:
Place the template as the first line within the table cell containing the list of nominations that the award applies to. Do not place this template on a separate table row, as it will no longer be accessible to blind Wikipedians.
Contoh
suntingIn an article, this could be implemented as follows:
|
Step-by-step to convert existing awards tables to this template
suntingHere are the steps to convert an existing non-accessible awards table to an accessible version. You can recognize such tables by the awards names being in separate table rows from the nominees lists:
Best Picture | Best Director |
---|---|
... (nominees/award for 1st category) |
... (nominees/award for 2nd category) |
Here is how to replace that table with table with an accessible table using the {{Award category}} template:
- Edit the Awards section of the page
Sample code at this point, before any editing:|-
|+ There may or may not be a line that captions the table
! style="background:#EEDD82; width:50%" | [[Academy Award for Best Picture|Best Picture]]
! style="background:#EEDD82; width:50%" | [[Academy Award for Best Director|Best Director]]
|-
| style="vertical-align:top;" |
... (nominees/award for 1st category)
| style="vertical-align:top;" |
... (nominees/award for 2nd category) - If there is a line near the start of the table that begins with
|+
, remove that line. - Move the width control that splits the table into two columns:
- Cut
; width:50%
from both styles - Paste after
style="vertical-align:top;"
- Remove the semicolons from after
style="vertical-align:top;"
- Change the colon after
width
to an equal sign - Add double-quotes around
50%
- Cut
- Review edits
How sample code looks now:|-
! style="background:#EEDD82" | [[Academy Award for Best Picture|Best Picture]]
! style="background:#EEDD82" | [[Academy Award for Best Director|Best Director]]
|-
| style="vertical-align:top;" width="50%" |
... (nominees/award for 1st category)
| style="vertical-align:top;" width="50%" |
... (nominees/award for 2nd category) - Replace the style lead-in with the template
- Replace
! style="background:#EEDD82" |
including the trailing space
with{{Award category|#EEDD82|
and no trailing space, so that the|
is right up against the title or title link
everywhere it occurs in the table code. If you use a text editor to do a global change, be sure to catch any variations on this. - On every line you added the {{Award category}} template to, be sure to add the trailing
}}
after the title or title link.
- Replace
- Review edits:
How sample code looks now:|-
{{Award category|#EEDD82|[[Academy Award for Best Picture|Best Picture]]}}
{{Award category|#EEDD82|[[Academy Award for Best Director|Best Director]]}}
|-
| style="vertical-align:top;" width="50%" |
... (nominees/award for 1st category)
| style="vertical-align:top;" width="50%" |
... (nominees/award for 2nd category) - Distribute each awards category template code to its respective list
- Move each line containing award category template code, for example,
{{Award category|#EEDD82|[[Academy Award for Best Picture|Best Picture]]}}
into the cell with the nominations list it applies to, immediately after thevalign
line - Delete the newly empty table rows that used to contain the category names, so that there aren't two lines with
|-
one after the other.
- Move each line containing award category template code, for example,
- Review edits:
How sample code looks now:|-
| style="vertical-align:top;" width="50%" |
{{Award category|#EEDD82|[[Academy Award for Best Picture|Best Picture]]}}
... (nominees/award for 1st category)
| style="vertical-align:top;" width="50%" |
{{Award category|#EEDD82|[[Academy Award for Best Director|Best Director]]}}
... (nominees/award for 2nd category) - Preview your work and correct any code errors
- When the table looks consistent and all awards are in the same cell as their nominees, you're done and you can publish.