Skip to content

Conversation

@AERobert
Copy link
Contributor

Fix a few issues in how the screen reader descriptions for structures and researches are put together.

  • Added handling for "HellArmy" (fortress troop) requirements when building the screen reader descriptions. Previously, attempting to describe a structure with such a requirement would throw an error and not speak anything. "Secure the Pit" was the earliest affected structure, and there were a few more later in the Elysium Fields.

  • Added the count of structures required for things with a requirement of a minimum number of structures to be built. I think "Second Contact" is the earliest item to have such a requirement.

  • Removed some extraneous text from screen reader descriptions. First, costless structures (such as completed ones or manual gathering options) now remove the text "Affordable. Costs:" from the description, as it doesn't apply when there are no costs at all. This change also adds code to append periods after the name and effect parts of the description inside the divs for those sections. Some screen readers would previously speak the descriptions as if there were a space before the periods.

The code that lists requirements for structures or researches for their screen reader descriptions did not handle the "hellArmy" requirement (soldiers in the fortress), first used in the "Secure the Pit" structure and later used for a few more progression structures in the Elysium Fields. This broke the descriptions for these structures and caused an error when the game attempted to speak them.
The screen reader descriptions for "completed structures" still contained the excess text "Affordable. Costs: " even though it can't be built. This change simply slices out that text if there are no listed costs.
The screen reader description did not include the number of required structures when listing requirements for something that required a certain number of a structure to be built. I think the earliest example is "Second Contact," whose description failed to specify how many ships were needed.
The name and effect parts of a screen reader description are wrapped in <div> tags, and the code previously appended the periods outside the <div> tags, which sometimes caused screen readers to read the word "period" aloud. This change appends the periods so that they are placed within the final <div>.
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