import { Fun, Id } from '@ephox/katamari';
import { Attribute } from '@ephox/sugar';
export const labelledBy = (labelledElement, labelElement) => {
    const labelId = Attribute.getOpt(labelledElement, 'id')
        .fold(() => {
        const id = Id.generate('dialog-label');
        Attribute.set(labelElement, 'id', id);
        return id;
    }, Fun.identity);
    Attribute.set(labelledElement, 'aria-labelledby', labelId);
};
//# sourceMappingURL=AriaLabel.js.map