working implementation of accordion-selected-option directive