Skip to content

Main content

Caption Cue Speaker Prefix Budget Tool

Count Unicode code points in the explicitly composed speaker-prefix caption, not rendered grapheme width.

Loading tool…

Description

Check a combined speaker prefix, separator and caption against a code-point budget.

Accessibility-related records can describe visible time, available formats, label text or supplied requirements. A count or budget can expose local gaps without establishing usable content, valid accommodations or compliance with a standard.

Check a combined speaker prefix, separator and caption against a code-point budget.

When to use this tool

Use Caption Cue Speaker Prefix Budget when checking an explicit accessibility record, time or layout convention.

How to use the tool and how it works

  1. Enter speakerPrefix, caption, limit, separator. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read used, remaining, fits. Inspect fits before interpreting the associated values.

Check a combined speaker prefix, separator and caption against a code-point budget. Require nonnegative whole limit; used counts Unicode code points of the concatenation; remaining = limit-used and fits includes equality.1

Input fieldMeaning and unitsAccepted input
speakerPrefixSpeaker PrefixRequired. Text; maximum UTF-16 length 8192.
captionCaptionRequired. Text; maximum UTF-16 length 8192.
limitLimitRequired. Safe integer; minimum 0.
separatorSeparatorRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
usedUnicode code points in prefix+separator+caption; not bytes, graphemes or rendered columns.Required. Safe integer.
remainingBudget minus use, in the same units; a negative value indicates excess use.Required. Safe integer.
fitsWhether the calculated use is no greater than the supplied budget.Required. Boolean.
json
{
  "input": {
    "speakerPrefix": "A",
    "caption": "Hello",
    "limit": 10,
    "separator": ": "
  },
  "output": {
    "used": 8,
    "remaining": 2,
    "fits": true
  }
}

Limitations and assumptions

  • Code points are not glyph widths or grapheme clusters; no caption line wrapping is performed.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use the applicable accessibility guidance, real content and user evaluation for practical adequacy; establish any legal requirement separately.

References

  1. Calculation and input contract: disability-studies/caption-cue-speaker-prefix-budget — tool.io

Similar or alternative tools