I am digitizing a 75-page index of job competencies. Users need to be able to link to each competency, competencies are meaningfully grouped, and competencies are often a sentence long. So instead of using each competency's text as an anchor, I'm creating a labeling scheme and creating anchors for each item. The competency "Know your right hand from your left" might be given the label "E.1.A.2.2". This is tedious.
I'm trying to save myself from manually adding the label to every competency again (since I've already added it once in the anchor.) To show the label, I can use the pseudo-element :before
to generate the label from the anchor, {content: attr(name);}
.
That works nicely, but the generated text isn't selectable. To create a link to a specific competency, users will have to manually type in "#E.1.A.2.2", which invites more user error than I'd like to think about.
Is it possible to make text generated by a pseudo-element selectable? I'm open to other suggestions as well. If creating each label in HTML is the only way to get to the needed result, I'll do that. But ouch.