Hide the redundant Aniimo skill heading for a single selection

The skill heading only helps tell two selected elements apart, so it now shows
for double selections alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-05 19:26:49 +01:00
parent 243465720f
commit 9a4de4a23d
3 changed files with 13 additions and 10 deletions

View file

@ -58,8 +58,8 @@ export function AniimoElements({ game, aniimo, content }) {
{results ? <div className="aniimo-matchup-panels">
<section className="nds-panel aniimo-matchup-panel" aria-labelledby="aniimo-attack-title">
<h2 id="aniimo-attack-title">{content.attack}</h2><p>{content.attackHelp}</p>
{selected.map((element, index) => <section key={element} className="aniimo-attack-element" aria-labelledby={`aniimo-attack-${element}`}>
<h3 id={`aniimo-attack-${element}`} className="nds-section-heading aniimo-skill-heading"><span className="aniimo-skill-label">{content.skill}</span><span className="nds-badge aniimo-skill-element" data-variant="gold"><ElementLabel element={element} t={t} size={28} /></span></h3>
{selected.map((element, index) => <section key={element} className="aniimo-attack-element" aria-label={selected.length === 1 ? `${content.skill} ${t(element)}` : undefined} aria-labelledby={selected.length > 1 ? `aniimo-attack-${element}` : undefined}>
{selected.length > 1 ? <h3 id={`aniimo-attack-${element}`} className="nds-section-heading aniimo-skill-heading"><span className="aniimo-skill-label">{content.skill}</span><span className="nds-badge aniimo-skill-element" data-variant="gold"><ElementLabel element={element} t={t} size={28} /></span></h3> : null}
<MatchupGroups entries={results.map((row) => ({ element: row.element, multiplier: row.attack[index].multiplier }))} prefix={`aniimo-attack-${element}-band`} content={content} t={t} />
</section>)}
</section>