I introduced _AttrValueMap because I'd like to ensure both an attrValueMap property and an attrValuePartialMap property in _ElementSelector class never hold data- attributes. But now I notice there are only a few place where attrValueMap and attrValuePartialMap are set, so you are right. Introducing new class may be too much and it should be eliminated.