Page MenuHomePhabricator

[MEX] M5 - Chevron for opening references - change size
Closed, ResolvedPublic

Description

The chevron for opening the references is currently tiny, which raises some accessibility/visibility concerns, and is not using codex.

Screenshot 2026-09-11 at 13.16.37.png (828×656 px, 50 KB)

We should use the accordion component and it should look like this in the end (i used the component here):

Screenshot 2026-09-15 at 11.37.29.png (850×338 px, 25 KB)

AC

  • use the accordion component from codex, set to mobile (changes the icon size and thickness, at last on figma), icon "Expand"
  • Font specifications (3 variants - pick what is most useful for implementation):
    • in tokens: font-family-system-sans / font-size-medium / font-weight-normal (font-weight.100)
    • in typography style: Body M/regular
    • fallback /in pixel language if tokens don't work): Sans serif, 16px, regular
  • because the component has it's own specific size, make sure there are no padding/margins messing up the spacing
  • chevron should not be bold, so it matches the "regular" font - so if the specification "mobile" doesn't exist or didn't change it, make it happen :D

Screenshot 2026-09-15 at 11.37.29.png (850×338 px, 25 KB)

Figma design from Larissa

Parameters for icons in codex

Event Timeline

Alice.moutinho updated the task description. (Show Details)
Alice.moutinho updated the task description. (Show Details)

Notes from story writing:
We should be using the component from codex:
https://doc.wikimedia.org/codex/latest/components/demos/accordion.html

If we are, why is it appearing this way?

If not, why are we not using codex? Can we replace it with codex?

Change #1343030 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Use CdxAccordion component to render references

https://gerrit.wikimedia.org/r/1343030

Change #1343030 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Use CdxAccordion component to render references

https://gerrit.wikimedia.org/r/1343030

Hello, the chevron looks great, but there is an unexpected side effect of the component: The clickable area gets a grey background, even after closed - and makes the references look like the instance name:

Arian's Beta test - Beta Wikidata 7.jpeg (1,125×2,436 px, 526 KB)
Can we remove this behaviour? @mahmoud, @ArthurTaylor

@Alice.moutinho yeah, we can probably override that style. Let's stick it in ready-for-dev again.

Change #1345914 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Remove focus highlight on CdxAccordion summary for references

https://gerrit.wikimedia.org/r/1345914

Change #1345914 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove focus highlight on CdxAccordion summary for references

https://gerrit.wikimedia.org/r/1345914