A 'modifier' serves, as the name suggests, to decorate the sentence.

Literal

''Modifier'' [topic-は], that [possessive-の] name [possessive-の] as, sentence [object-を] decorate role [object-を] does.

Another textbook grammar definition. 修飾語 ('modifier') literally 'decoration word' — 修飾 = 'ornamentation, modification'. The explanation plays on the etymology: 'as the name suggests, it decorates'. 名前のとおり ('as the name indicates') is a set phrase. 役目 ('role, duty, function') + をする = 'to play a role'.