Skip to content

Conversation

@AERobert
Copy link
Contributor

  • Add a Heading level 2 at the top of the City civilization subtab. (All other subtabs already had such a heading except for City.)
  • A similar heading is added at the top of the Government subtab of the Civics tab, before the government selection control.
  • Also on the Government subtab, the headings for "Garrison" and "Foreign Powers" now appear as Heading level 3s, and the names for each foreign nation now appear as Heading level 4s.
  • On the Perks page of the wiki, the name of each perk will now appear as a Heading level 2. (This was the only wiki page to lack any heading.)
  • For all the Structures and ARPA project entries on the wiki, the accompanying headings for "Cost" and "Cost Creep" now appear as Heading level 3s, distinguishing them from the headings for the structures themselves.

All changes either use aria to have already existent elements appear as different headings to screen readers, or change is-sr-only headings only visible to screen readers, so nothing should change visually.

@pmotschmann pmotschmann changed the base branch from master to genetics May 25, 2025 17:27
@pmotschmann pmotschmann changed the base branch from genetics to master September 22, 2025 02:29
Every Civilization sub tab except for City had a screen reader only h2 element at the top. This commit adds one for consistency in the drawCity() function.
* Adds a screen reader only h2 element to the top of the government tab.
* Use aria-level to make the "Garrison" and "Foreign Powers " headings to appear as h3s. (only on the government tab)
* Use aria to have the names of each foreign nation appear as h4s.
Most wiki pages have at least one set of headings allowing quick navigation between the main items on the page. As far as I can tell, the perks page is the only exception. This change uses aria to make the names of each perk appear as h2s.
All the "Cost" and "Cost Creep" headings for each structure and ARPA project were H2 headings, the same as the heading with each structure's name, so it could take up to three times longer to navigate one of these wiki pages using a screen reader. This change uses the aria-level attribute to make these headings appear as H3 headings to screen readers.
@AERobert
Copy link
Contributor Author

Merged with current Master branch (sorry for force pushing). Also updated the new city heading to use the current city tab label so it changes as the population increases.

Edit the code for the new city tab heading again so that the name correctly updates with the growing population reactively. The last commit made it updatable, but it would only do so when the tab reloaded.

Code wise, just added a call to vBind to the heading element and the tabLabel function.
@AERobert
Copy link
Contributor Author

Fixed the city heading to be actually reactive using vBind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant