The caption is associated with the input via its ID and the input's accessible-described-by attribute. By doing this, screen readers are able to understand the association and will read the caption when the input receives focus.