Block 202 of 297
Achievement Data
Graduation, attendance and subject proficiency as labeled bars compared with district and state, with a table view and source.
- Puck key
- AchievementDataBlock
- Export
- achievementDataBlock
- React component
- <AchievementData />
- Path
- components/puck/achievement-data-block.tsx
- Dependencies
- None
- License
- MIT
About this block
When to use it, how to write for it, and what to change in the code.
What it's for
A school performance snapshot: large headline rates such as graduation and attendance, then subject proficiency as horizontal bars comparing the school, the district and the state. Every bar has its percentage printed beside it, and a toggle reveals the same numbers as a table. Subjects sit two per row on tablets and up, one on phones.
- A school profile or "About our school" page
- An annual accountability or report card summary
- A board presentation page comparing a school with state results
Writing the content
- Enter percentages as plain numbers like 91 or 91%. Values are clamped to 0 to 100, and an unreadable value shows a dash.
- District % and State % are optional. Each headline card states how many points it sits above or below the district, so check that comparison reads fairly before publishing.
- Keep Source filled in with the agency and school year. The sample data is labeled as illustrative and must be replaced.
Accessibility
- Bars are hidden from assistive technology; each value is printed as text next to its bar, so nothing depends on bar length or color (WCAG 1.1.1, 1.4.1).
- The "View as a table" disclosure uses native details and summary and contains a captioned table with column and row headers (WCAG 1.3.1).
- School, district and state labels appear on every bar row in text, not only in the legend, so the series can be told apart without color.
Customizing the code
- Series colors live in the series array: bg-indigo-600 for the school, bg-indigo-300 for the district and bg-neutral-400 for the state.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- School name (short)text
- Headline ratesarray
- Subjects headingtext
- Subjectsarray
- Sourcetextarea
- Full report link texttext
- Full report linktext